Fix: racy notifier captures update vs traversal
[lttng-modules.git] / src / probes / lttng-kprobes.c
index 4e80f1ef62e3acf5ae61c949c8a5af3be7eb4a25..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);
+       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.024061 seconds and 4 git commands to generate.