summaryrefslogtreecommitdiffstats
path: root/samples/bpf/spintest_kern.c
diff options
context:
space:
mode:
Diffstat (limited to 'samples/bpf/spintest_kern.c')
-rw-r--r--samples/bpf/spintest_kern.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/samples/bpf/spintest_kern.c b/samples/bpf/spintest_kern.c
index 4b27619d91a4..ce0167d09cdc 100644
--- a/samples/bpf/spintest_kern.c
+++ b/samples/bpf/spintest_kern.c
@@ -34,7 +34,7 @@ struct bpf_map_def SEC("maps") stackmap = {
#define PROG(foo) \
int foo(struct pt_regs *ctx) \
{ \
- long v = ctx->ip, *val; \
+ long v = PT_REGS_IP(ctx), *val; \
\
val = bpf_map_lookup_elem(&my_map, &v); \
bpf_map_update_elem(&my_map, &v, &v, BPF_ANY); \