X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=probes%2Flttng-kprobes.c;h=6d2038e71d5f3244963b979297f141895605e2cc;hb=a47bb805a1b9335c5305d9b9f8886d4ab70a39a2;hp=daf14ceca9d42ac29e85edd279dbbaea59b0763a;hpb=156a3977f8fa114924d7bbd2bd04c94fd2ac0649;p=lttng-modules.git diff --git a/probes/lttng-kprobes.c b/probes/lttng-kprobes.c index daf14cec..6d2038e7 100644 --- a/probes/lttng-kprobes.c +++ b/probes/lttng-kprobes.c @@ -28,6 +28,7 @@ #include #include #include +#include static int lttng_kprobes_handler_pre(struct kprobe *p, struct pt_regs *regs) @@ -43,11 +44,11 @@ int lttng_kprobes_handler_pre(struct kprobe *p, struct pt_regs *regs) int ret; unsigned long data = (unsigned long) p->addr; - if (unlikely(!ACCESS_ONCE(chan->session->active))) + if (unlikely(!READ_ONCE(chan->session->active))) return 0; - if (unlikely(!ACCESS_ONCE(chan->enabled))) + if (unlikely(!READ_ONCE(chan->enabled))) return 0; - if (unlikely(!ACCESS_ONCE(event->enabled))) + if (unlikely(!READ_ONCE(event->enabled))) return 0; lib_ring_buffer_ctx_init(&ctx, chan->chan, <tng_probe_ctx, sizeof(data),