Fix: racy notifier captures update vs traversal
[lttng-modules.git] / src / probes / lttng-kprobes.c
index 6824088c3d752d9f38b754894fae3cab932d6d9a..dc18f5077fc1091afab28119dc352deccc09287d 100644 (file)
@@ -54,11 +54,13 @@ int lttng_kprobes_event_notifier_handler_pre(struct kprobe *p, struct pt_regs *r
 {
        struct lttng_event_notifier *event_notifier =
                container_of(p, struct lttng_event_notifier, u.kprobe.kp);
+       struct lttng_kernel_notifier_ctx notif_ctx;
 
        if (unlikely(!READ_ONCE(event_notifier->enabled)))
                return 0;
 
-       event_notifier->send_notification(event_notifier, NULL, NULL);
+       notif_ctx.eval_capture = LTTNG_READ_ONCE(event_notifier->eval_capture);
+       event_notifier->send_notification(event_notifier, NULL, NULL, &notif_ctx);
 
        return 0;
 }
This page took 0.02372 seconds and 4 git commands to generate.