]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Add missing bpf_read_[un]lock_trace() for syscall program
authorYonghong Song <yhs@fb.com>
Mon, 9 Aug 2021 23:51:51 +0000 (16:51 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Tue, 10 Aug 2021 08:10:49 +0000 (10:10 +0200)
commit9cc6f0165cc872150098be5bc53ce0a5f6e4772a
tree11879d3cfc48083ece2a1f0e9960aed3bcca8792
parentdd5e19cd193510274e9ba756b4c8db0f0276f91b
bpf: Add missing bpf_read_[un]lock_trace() for syscall program

Commit a50f853bb74c5 ("bpf: Introduce bpf_sys_bpf() helper and program type.")
added support for syscall program, which is a sleepable program.

But the program run missed bpf_read_lock_trace()/bpf_read_unlock_trace(),
which is needed to ensure proper rcu callback invocations. This patch adds
bpf_read_[un]lock_trace() properly.

Fixes: a50f853bb74c5 ("bpf: Introduce bpf_sys_bpf() helper and program type.")
Signed-off-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20210809235151.1663680-1-yhs@fb.com
net/bpf/test_run.c