MPTCP Linux Development
 help / color / mirror / Atom feed
* [PATCH mptcp-net 0/3] mptcp: fix memcg accounting for passive sockets
@ 2025-11-07 21:55 Paolo Abeni
  2025-11-07 21:55 ` [PATCH mptcp-net 1/3] net: factor-out _sk_charge() helper Paolo Abeni
                   ` (5 more replies)
  0 siblings, 6 replies; 19+ messages in thread
From: Paolo Abeni @ 2025-11-07 21:55 UTC (permalink / raw)
  To: mptcp

It turns out that the splat reported earlier is indeed due to an old
bug/missing feature that hit hard on top of "mptcp: borrow forward 
memory from subflow", as we can borrow accounted memory from a socket
not doing any accounting;)

It should land upstream before the above mentioned commit, ence the
'net' target, but it could as well be net-next material.

I think there is still a racing window to produce the splat reported in
#597: if a subflow receive data while the msk is locked, and before the
memcg is initialized on such subflow, it will push the data into the msk
becklog, and later borrow will again try to grab accounted memory from
non accounting ssk.

I have a tentative fix for that one but it's quite ugly and I'll keep it
separate from this series.

Paolo Abeni (3):
  net: factor-out _sk_charge() helper
  mptcp: factor-out cgroup data inherit helper
  mptcp: fix memcg accounting for passive sockets

 include/net/sock.h   |  2 ++
 net/core/sock.c      | 18 ++++++++++++++++++
 net/ipv4/af_inet.c   | 17 +----------------
 net/mptcp/protocol.c | 36 ++++++++++++++++++++++++++----------
 net/mptcp/protocol.h |  3 +++
 net/mptcp/subflow.c  | 30 ++++++++++++++++++++++--------
 6 files changed, 72 insertions(+), 34 deletions(-)

-- 
2.51.0


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

end of thread, other threads:[~2025-11-12 10:10 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-07 21:55 [PATCH mptcp-net 0/3] mptcp: fix memcg accounting for passive sockets Paolo Abeni
2025-11-07 21:55 ` [PATCH mptcp-net 1/3] net: factor-out _sk_charge() helper Paolo Abeni
2025-11-11  7:24   ` Geliang Tang
2025-11-11 17:38   ` Matthieu Baerts
2025-11-12  9:04     ` Paolo Abeni
2025-11-12  9:16       ` Matthieu Baerts
2025-11-12  9:28         ` Paolo Abeni
2025-11-12  9:55           ` Matthieu Baerts
2025-11-07 21:55 ` [PATCH mptcp-net 2/3] mptcp: factor-out cgroup data inherit helper Paolo Abeni
2025-11-11  7:24   ` Geliang Tang
2025-11-07 21:55 ` [PATCH mptcp-net 3/3] mptcp: fix memcg accounting for passive sockets Paolo Abeni
2025-11-11  8:37   ` Geliang Tang
2025-11-11 17:25     ` Matthieu Baerts
2025-11-12  9:10       ` Paolo Abeni
2025-11-08 15:15 ` [PATCH mptcp-net 0/3] " MPTCP CI
2025-11-11 17:26 ` Matthieu Baerts
2025-11-12  9:35   ` Paolo Abeni
2025-11-12  9:58     ` Matthieu Baerts
2025-11-12 10:10 ` Matthieu Baerts

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox