]> git.baikalelectronics.ru Git - kernel.git/commit
tipc: set kern=0 in sk_alloc() during tipc_accept()
authorParthasarathy Bhuvaragan <parthasarathy.bhuvaragan@ericsson.com>
Tue, 1 Nov 2016 13:02:36 +0000 (14:02 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 1 Nov 2016 15:53:23 +0000 (11:53 -0400)
commitcf04bac4d6b2cd3d044bed1bf08b88d31d937f7d
tree6855eec3e7ab63daa7e2bd2dce9792bee7fdb314
parenta226c04c0ef9226babebabdce1de1cf05e29e07b
tipc: set kern=0 in sk_alloc() during tipc_accept()

Until now, tipc_accept() calls sk_alloc() with kern=1. This is
incorrect as the data socket's owner is the user application.
Thus for these accepted data sockets the network namespace
refcount is skipped.

In this commit, we fix this by setting kern=0.

Acked-by: Ying Xue <ying.xue@windriver.com>
Acked-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: Parthasarathy Bhuvaragan <parthasarathy.bhuvaragan@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/socket.c