Skip to content

net: defer cgroups init to accept()

Eric Dumazet netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2net: memcontrol: defer call to mem_cgroup_sk_alloc()mm/memcontrol.c net/core/sock.c net/ipv4/inet_connection_sock.c+5 -160 replies
2/2net: defer call to cgroup_sk_alloc()kernel/cgroup/cgroup.c net/core/sock.c net/ipv4/inet_connection_sock.c+6 -130 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH net-next 0/2] net: defer cgroups init to accept()

After TCP 3WHS became lockless, we should not attempt cgroup games from sk_clone_lock() since listener/cgroup might be already gone.

Move this business to inet_csk_accept() where we have the guarantee both parent and child exist.

Many thanks to John Sperbeck for spotting these issues

Eric Dumazet (2):
net: memcontrol: defer call to mem_cgroup_sk_alloc()
net: defer call to cgroup_sk_alloc()

 kernel/cgroup/cgroup.c          | 11 -----------
 mm/memcontrol.c                 | 15 ---------------
 net/core/sock.c                 |  8 +++++---
 net/ipv4/inet_connection_sock.c |  6 ++++++
 4 files changed, 11 insertions(+), 29 deletions(-)
Signature · 1 line
2.14.2.920.gcf0c67979c-goog