]> git.baikalelectronics.ru Git - kernel.git/commit
net: Modify sk_alloc to not reference count the netns of kernel sockets.
authorEric W. Biederman <ebiederm@xmission.com>
Sat, 9 May 2015 02:10:31 +0000 (21:10 -0500)
committerDavid S. Miller <davem@davemloft.net>
Mon, 11 May 2015 14:50:18 +0000 (10:50 -0400)
commita3d12183ab9d79f5a8ab8c53bbce822f2f4d35a8
treee2161c09531299ce4bfbeb1506c420b9f8db7fc2
parentff3a8ef94b6fceb1777e9eba3ac61ff68fd52a7a
net: Modify sk_alloc to not reference count the netns of kernel sockets.

Now that sk_alloc knows when a kernel socket is being allocated modify
it to not reference count the network namespace of kernel sockets.

Keep track of if a socket needs reference counting by adding a flag to
struct sock called sk_net_refcnt.

Update all of the callers of sock_create_kern to stop using
sk_change_net and sk_release_kernel as those hacks are no longer
needed, to avoid reference counting a kernel socket.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/inet_common.h
include/net/sock.h
net/core/sock.c
net/ipv4/af_inet.c
net/ipv4/udp_tunnel.c
net/ipv6/ip6_udp_tunnel.c
net/l2tp/l2tp_core.c
net/netfilter/ipvs/ip_vs_sync.c