mptcp: fix memcg accounting for passive sockets
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 15 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | net: factor-out _sk_charge() helperinclude/ net/ net/ | +21 | 6 replies | |
| 2/3 | mptcp: factor-out cgroup data inherit helpernet/ net/ | +14 | 1 reply | |
| 3/3 | mptcp: fix memcg accounting for passive socketsnet/ net/ net/ | +37 | 3 replies |
Reviews trailers per patch
2 of 3 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Geliang Tang | Matthieu Baerts (NGI0) |
|---|---|---|
| Series | R-b | |
| 1/3 | R-b | |
| 2/3 | R-b | |
| 3/3 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH mptcp-net 0/3] mptcp: fix memcg accounting for passive sockets
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(-)
Signature · 1 line
2.51.0