X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=probes%2Flttng-uprobes.c;h=bcdbbd84840259b1a701b39934d6cb3415c1258c;hb=b29a9c89c78c0d380625475f5810630a1c121ae8;hp=47f3599f2baa336dd6c7e543a81aef5070b67efb;hpb=3aed4dca825a63757a3c95b9d41019660f83e02d;p=lttng-modules.git diff --git a/probes/lttng-uprobes.c b/probes/lttng-uprobes.c index 47f3599f..bcdbbd84 100644 --- a/probes/lttng-uprobes.c +++ b/probes/lttng-uprobes.c @@ -52,11 +52,11 @@ int lttng_uprobes_handler_pre(struct uprobe_consumer *uc, struct pt_regs *regs) unsigned long ip; } payload; - 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, @@ -67,7 +67,7 @@ int lttng_uprobes_handler_pre(struct uprobe_consumer *uc, struct pt_regs *regs) return 0; /* Event payload. */ - payload.ip = regs->ip; + payload.ip = (unsigned long)instruction_pointer(regs); lib_ring_buffer_align_ctx(&ctx, lttng_alignof(payload)); chan->ops->event_write(&ctx, &payload, sizeof(payload));