• Glauber Costa's avatar
    net: fix sock_clone reference mismatch with tcp memcontrol · f3f511e1
    Glauber Costa authored
    Sockets can also be created through sock_clone. Because it copies
    all data in the sock structure, it also copies the memcg-related pointer,
    and all should be fine. However, since we now use reference counts in
    socket creation, we are left with some sockets that have no reference
    counts. It matters when we destroy them, since it leads to a mismatch.
    Signed-off-by: default avatarGlauber Costa <glommer@parallels.com>
    CC: David S. Miller <davem@davemloft.net>
    CC: Greg Thelen <gthelen@google.com>
    CC: Hiroyouki Kamezawa <kamezawa.hiroyu@jp.fujitsu.com>
    CC: Laurent Chavey <chavey@google.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    f3f511e1
sock.c 66.4 KB