Series takes care of two issues with sockmap update: inconsistent behaviour after update with same, and race/refcount imbalance on element replace.
I am hesitant if patch 3/3 ("bpf, sockmap: Fix race between element replace and close()") is the right approach. I might have missed some detail of the current __sock_map_delete() implementation. I'd be grateful for comments, thanks.
Signed-off-by: Michal Luczaj mhal@rbox.co --- Michal Luczaj (3): bpf, sockmap: Fix update element with same selftest/bpf: Extend test for sockmap update with same bpf, sockmap: Fix race between element replace and close()
net/core/sock_map.c | 6 +++--- tools/testing/selftests/bpf/prog_tests/sockmap_basic.c | 8 +++++--- 2 files changed, 8 insertions(+), 6 deletions(-) --- base-commit: 537a2525eaf76ea9b0dca62b994500d8670b39d5 change-id: 20241201-sockmap-replace-67c7077f3a31
Best regards,