Fix: ACCESS_ONCE was removed in 4.15, use READ_ONCE instead
[lttng-modules.git] / probes / lttng-uprobes.c
index 47f3599f2baa336dd6c7e543a81aef5070b67efb..bcdbbd84840259b1a701b39934d6cb3415c1258c 100644 (file)
@@ -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, &lttng_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));
This page took 0.023784 seconds and 4 git commands to generate.