diff --git a/kernel/bpf/core.c b/kernel/bpf/core.c index d12efb2550d35bb0885a864cf10ab05105339c02..2e4a658d65d6e7bd9ea0b565f2bbc483fd187425 100644 --- a/kernel/bpf/core.c +++ b/kernel/bpf/core.c @@ -831,7 +831,7 @@ int bpf_jit_charge_modmem(u32 pages) { if (atomic_long_add_return(pages, &bpf_jit_current) > (bpf_jit_limit >> PAGE_SHIFT)) { - if (!capable(CAP_SYS_ADMIN)) { + if (!bpf_capable()) { atomic_long_sub(pages, &bpf_jit_current); return -EPERM; }