diff --git a/kernel/bpf/memalloc.c b/kernel/bpf/memalloc.c index bd45dda9dc35..1d7ddfc1c9d1 100644 --- a/kernel/bpf/memalloc.c +++ b/kernel/bpf/memalloc.c @@ -957,7 +957,9 @@ void notrace bpf_mem_cache_free_rcu(struct bpf_mem_alloc *ma, void *ptr) if (!ptr) return; + get_cpu(); unit_free_rcu(this_cpu_ptr(ma->cache), ptr); + put_cpu(); } /* Directly does a kfree() without putting 'ptr' back to the free_llist