Skip to content

libbpf: fixes for AF_XDP teardown

Björn Töpel bpf netdev 1 version Applied

Status from this message: Applied. Thanks!

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 7 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/2libbpf: fix invalid munmap calltools/lib/bpf/xsk.c+40 -374 replies
2/2libbpf: proper XSKMAP cleanuptools/lib/bpf/xsk.c+60 -551 reply

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchJonathan LemonWilliam Tu
SeriesR-b
1/2T-b
2/2T-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/2] libbpf: fixes for AF_XDP teardown

William found two bugs, when doing socket teardown within the same process.

The first issue was an invalid munmap call, and the second one was an invalid XSKMAP cleanup. Both resulted in that the process kept references to the socket, which was not correctly cleaned up. When a new socket was created, the bind() call would fail, since the old socket was still lingering, refusing to give up the queue on the netdev.

More details can be found in the individual commits.

Thanks,
Björn

Björn Töpel (2):
libbpf: fix invalid munmap call
libbpf: proper XSKMAP cleanup

 tools/lib/bpf/xsk.c | 192 +++++++++++++++++++++++---------------------
 1 file changed, 100 insertions(+), 92 deletions(-)
Signature · 1 line
2.20.1