Fix: RCU-aware add event recorder to RCU dispatch list
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 5 Nov 2021 16:31:34 +0000 (12:31 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 5 Nov 2021 16:31:34 +0000 (12:31 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I0a9f95fb04d00ce8e38e047d193401ee1178eac5

src/lttng-syscalls.c

index b9ae5e3ad104090fc11047177147c6a25a10b9ea..bc8e6e715ff3de73b9348984fc40a89afcdb75ee 100644 (file)
@@ -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:
This page took 0.026838 seconds and 4 git commands to generate.