summaryrefslogtreecommitdiff
path: root/kernel/bpf/cgroup.c
diff options
context:
space:
mode:
authorAlexei Starovoitov <ast@kernel.org>2024-04-24 19:00:23 +0300
committerAlexei Starovoitov <ast@kernel.org>2024-04-24 19:06:50 +0300
commitdc92febf7b93da5049fe177804e6b1961fcc6bd7 (patch)
treecd49ada6055ba7c3933b03d82998efb303ec19a1 /kernel/bpf/cgroup.c
parent6e10b6350a67d398c795ac0b93a7bb7103633fe4 (diff)
downloadlinux-dc92febf7b93da5049fe177804e6b1961fcc6bd7.tar.xz
bpf: Don't check for recursion in bpf_wq_work.
__bpf_prog_enter_sleepable_recur does recursion check which is not applicable to wq callback. The callback function is part of bpf program and bpf prog might be running on the same cpu. So recursion check would incorrectly prevent callback from running. The code can call __bpf_prog_enter_sleepable(), but run_ctx would be fake, hence use explicit rcu_read_lock_trace(); migrate_disable(); to address this problem. Another reason to open code is __bpf_prog_enter* are not available in !JIT configs. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202404241719.IIGdpAku-lkp@intel.com/ Closes: https://lore.kernel.org/oe-kbuild-all/202404241811.FFV4Bku3-lkp@intel.com/ Fixes: eb48f6cd41a0 ("bpf: wq: add bpf_wq_init") Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'kernel/bpf/cgroup.c')
0 files changed, 0 insertions, 0 deletions