aboutsummaryrefslogtreecommitdiff
path: root/tools/lib/api/debug.h
diff options
context:
space:
mode:
authorHou Tao <houtao1@huawei.com>2023-12-14 12:30:09 +0800
committerAlexei Starovoitov <ast@kernel.org>2023-12-13 20:49:11 -0800
commit8f82583f9527b3be9d70d9a5d1f33435e29d0480 (patch)
treef295c8b23b7beead0a0bb9a2e880b7356299769d /tools/lib/api/debug.h
parent2a0c6b41eec90c2a138ea8b574836744783c67ff (diff)
bpf: Reduce the scope of rcu_read_lock when updating fd map
There is no rcu-read-lock requirement for ops->map_fd_get_ptr() or ops->map_fd_put_ptr(), so doesn't use rcu-read-lock for these two callbacks. For bpf_fd_array_map_update_elem(), accessing array->ptrs doesn't need rcu-read-lock because array->ptrs must still be allocated. For bpf_fd_htab_map_update_elem(), htab_map_update_elem() only requires rcu-read-lock to be held to avoid the WARN_ON_ONCE(), so only use rcu_read_lock() during the invocation of htab_map_update_elem(). Acked-by: Yonghong Song <yonghong.song@linux.dev> Signed-off-by: Hou Tao <houtao1@huawei.com> Link: https://lore.kernel.org/r/20231214043010.3458072-2-houtao@huaweicloud.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/lib/api/debug.h')
0 files changed, 0 insertions, 0 deletions