]> git.baikalelectronics.ru Git - kernel.git/commit
net: kernel socket should be released in init_net namespace
authorYing Xue <ying.xue@windriver.com>
Mon, 16 Mar 2015 10:19:12 +0000 (18:19 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 16 Mar 2015 20:25:06 +0000 (16:25 -0400)
commitc35d8a99f148f5699cf7f3eb6301f1bfd0370188
tree13ce4c9af9215945e69a86300039396bfb1f04cd
parent179d88f36accb63aa0e17dd200ea0284f74d7893
net: kernel socket should be released in init_net namespace

Creating a kernel socket with sock_create_kern() happens in "init_net"
namespace, however, releasing it with sk_release_kernel() occurs in
the current namespace which may be different with "init_net" namespace.
Therefore, we should guarantee that the namespace in which a kernel
socket is created is same as the socket is created.

Signed-off-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/sock.c