From: Mathieu Desnoyers Date: Fri, 5 Nov 2021 16:31:34 +0000 (-0400) Subject: Fix: RCU-aware add event recorder to RCU dispatch list X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=fd70f5a5f72ac11b36f67f3a4bdee03cd9a39648;p=lttng-modules.git Fix: RCU-aware add event recorder to RCU dispatch list Signed-off-by: Mathieu Desnoyers Change-Id: I0a9f95fb04d00ce8e38e047d193401ee1178eac5 --- diff --git a/src/lttng-syscalls.c b/src/lttng-syscalls.c index b9ae5e3a..bc8e6e71 100644 --- a/src/lttng-syscalls.c +++ b/src/lttng-syscalls.c @@ -577,7 +577,8 @@ void lttng_syscall_event_enabler_create_event(struct lttng_event_enabler_common printk(KERN_INFO "Unable to create event recorder %s\n", desc->event_name); return; } - hlist_add_head(&event->priv->u.syscall.node, &dispatch_table[syscall_nr]); + if (dispatch_table) + hlist_add_head_rcu(&event->priv->u.syscall.node, &dispatch_table[syscall_nr]); break; } case LTTNG_EVENT_ENABLER_TYPE_NOTIFIER: