bpf, sockmap: fix potential memory leak
Status from this message: This series was applied to bpf/bpf.git (refs/heads/master):
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest2 patches 4 repliesApplied 2/2
- v32 patches 5 repliesSuperseded
- v22 patches 4 repliesSuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v1 | 2 patches | 0 replies | Superseded |
Patches in v4 All 2 applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | bpf, sockmap: fix potential memory leak on unlikely error casenet/ | +11 | 1 reply | Applied |
| 2/2 | bpf, sockmap: sk_prot needs inuse_idx set for proc statsnet/ | +1 | 2 replies | Applied |
Reviews trailers per patch
All 2 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Jakub Sitnicki | Cong Wang |
|---|---|---|
| Series | A-b | |
| 1/2 | R-b | |
| 2/2 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH bpf v4 0/2] bpf, sockmap: fix potential memory leak
While investigating a memleak in sockmap I found these two issues. Patch 1 found doing code review, I wasn't able to get KASAN to trigger a memleak here, but should be necessary. Patch 2 fixes proc stats so when we use sockstats for debugging we get correct values.
The fix for observered memleak will come after these, but requires some more discussion and potentially patch revert so I'll try to get the set here going now.
v4: fix both users of sk_psock_skb_ingress_enqueue and then fix the
inuse idx by moving init hook later after tcp/udp init calls.
v3: move kfree into same function as kalloc
John Fastabend (2):
bpf, sockmap: fix potential memory leak on unlikely error case bpf, sockmap: sk_prot needs inuse_idx set for proc stats
net/core/skmsg.c | 16 +++++++++++----- net/core/sock_map.c | 11 ++++++++++- 2 files changed, 21 insertions(+), 6 deletions(-)
Signature · 1 line
2.25.1