Skip to content

bpf, sockmap: Fix the element replace

Michal Luczaj bpf linux-kselftest netdev 1 version Applied

Status from this message: This series was applied to bpf/bpf.git (master)

Get series with b4
b4 am [email protected] change-id 20241201-sockmap-replace-67c7077f3a31

Versions newest first

  1. v1 Latest3 patches 4 repliesApplied 3/3

Patches in v1 All 3 applied

#Subject and filesSizeRepliesApplied
1/3bpf, sockmap: Fix update element with samenet/core/sock_map.c+1 -02 repliesApplied
2/3selftest/bpf: Extend test for sockmap update with sametools/testing/selftests/bpf/prog_tests/sockmap_basic.c+5 -31 replyApplied
3/3bpf, sockmap: Fix race between element replace and close()net/core/sock_map.c+2 -31 replyApplied

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchJohn Fastabend
1/3R-b
2/3R-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH bpf 0/3] bpf, sockmap: Fix the element replace

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.

---
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,

Signature · 1 line
Michal Luczaj <[email protected]>