]> www.infradead.org Git - users/jedix/linux-maple.git/commit
net: Modify sk_alloc to not reference count the netns of kernel sockets.
authorSowmini Varadhan <sowmini.varadhan@oracle.com>
Thu, 27 Aug 2015 23:23:26 +0000 (19:23 -0400)
committerMukesh Kacker <mukesh.kacker@oracle.com>
Fri, 4 Sep 2015 01:39:24 +0000 (18:39 -0700)
commitb5792fb73b2b2d694d4969194e2bf0e541e60584
tree99336c751b8d60b59e485b811aab70d6ddb4ea14
parent1df360bf591f3e2a45f2538cc23b8dfa0251347d
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.

Backport of upstream commits: 26abe14379f8e2fa3fd1bcf97c9a7ad9364886fe

Orabug 21437445

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
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