diff --git a/kernel/bpf/syscall.c b/kernel/bpf/syscall.c index 4fb08c43420d19fd9e5c59bcd8800494e3d5fc01..d35a6aa3aa963fd8259b8506223b03532c64751d 100644 --- a/kernel/bpf/syscall.c +++ b/kernel/bpf/syscall.c @@ -598,7 +598,7 @@ void bpf_map_free_kptrs(struct bpf_map *map, void *map_value) if (off_desc->type == BPF_KPTR_UNREF) { u64 *p = (u64 *)btf_id_ptr; - WRITE_ONCE(p, 0); + WRITE_ONCE(*p, 0); continue; } old_ptr = xchg(btf_id_ptr, 0);