bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 bpf 0/2] potential sockmap memleak and proc stats fix
@ 2021-07-02  0:11 John Fastabend
  2021-07-02  0:11 ` [PATCH v2 bpf 1/2] bpf, sockmap: fix potential msg memory leak John Fastabend
  2021-07-02  0:11 ` [PATCH v2 bpf 2/2] bpf, sockmap: sk_prot needs inuse_idx for proc stats John Fastabend
  0 siblings, 2 replies; 7+ messages in thread
From: John Fastabend @ 2021-07-02  0:11 UTC (permalink / raw)
  To: ast, daniel, andriin; +Cc: bpf, netdev, john.fastabend

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.

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    | 4 +++-
 net/core/sock_map.c | 9 +++++++++
 2 files changed, 12 insertions(+), 1 deletion(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-07-05 16:29 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-02  0:11 [PATCH v2 bpf 0/2] potential sockmap memleak and proc stats fix John Fastabend
2021-07-02  0:11 ` [PATCH v2 bpf 1/2] bpf, sockmap: fix potential msg memory leak John Fastabend
2021-07-02 19:54   ` Cong Wang
2021-07-05 16:27     ` John Fastabend
2021-07-02  0:11 ` [PATCH v2 bpf 2/2] bpf, sockmap: sk_prot needs inuse_idx for proc stats John Fastabend
2021-07-02 19:50   ` Cong Wang
2021-07-05 16:28     ` John Fastabend

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).