X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=liblttng-ust%2Flttng-ust-statedump.c;h=4242579fa13616341c7607667d31e523d88be486;hb=246bb09aab94e1d50877eb585e8f21a13acf270a;hp=c2926aecdb78eeaffc097cf6fe27d04f9e89330c;hpb=b553ed99d39d428363d482b50e41c4cff5e99f7b;p=lttng-ust.git diff --git a/liblttng-ust/lttng-ust-statedump.c b/liblttng-ust/lttng-ust-statedump.c index c2926aec..4242579f 100644 --- a/liblttng-ust/lttng-ust-statedump.c +++ b/liblttng-ust/lttng-ust-statedump.c @@ -334,12 +334,22 @@ int do_baddr_statedump(void *owner) * session, statedumps from different processes may be * interleaved. The vpid context should be used to identify which * events belong to which process. + * + * Grab the ust_lock outside of the RCU read-side lock because we + * perform synchronize_rcu with the ust_lock held, which can trigger + * deadlocks otherwise. */ int do_lttng_ust_statedump(void *owner) { + ust_lock_nocheck(); trace_statedump_start(owner); + ust_unlock(); + do_baddr_statedump(owner); + + ust_lock_nocheck(); trace_statedump_end(owner); + ust_unlock(); return 0; }