On 12/8/23 2:33 AM, Hou Tao wrote:
From: Hou Tao <houtao1@xxxxxxxxxx> 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 will not be freed until the map-in-map is released. For bpf_fd_htab_map_update_elem(), htab_map_update_elem() requires rcu-read-lock to be held, so only use rcu_read_lock() during the invocation of htab_map_update_elem(). Signed-off-by: Hou Tao <houtao1@xxxxxxxxxx>
Acked-by: Yonghong Song <yonghong.song@xxxxxxxxx>