]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
tipc: fix topology server broken issue
authorYing Xue <ying.xue@windriver.com>
Thu, 23 Apr 2015 13:37:38 +0000 (09:37 -0400)
committerDavid S. Miller <davem@davemloft.net>
Thu, 23 Apr 2015 15:50:34 +0000 (11:50 -0400)
commitdef81f69bfbd70a3278a7592a4ab8717300cbac1
treea45610500809598ca7c9bcb247e927c3f2579553
parent4fce14820c1b0a3fd399719f970e0c3ae40dd270
tipc: fix topology server broken issue

When a new topology server is launched in a new namespace, its
listening socket is inserted into the "init ns" namespace's socket
hash table rather than the one owned by the new namespace. Although
the socket's namespace is forcedly changed to the new namespace later,
the socket is still stored in the socket hash table of "init ns"
namespace. When a client created in the new namespace connects
its own topology server, the connection is failed as its server's
socket could not be found from its own namespace's socket table.

If __sock_create() instead of original sock_create_kern() is used
to create the server's socket through specifying an expected namesapce,
the socket will be inserted into the specified namespace's socket
table, thereby avoiding to the topology server broken issue.

Fixes: 76100a8a64bc ("tipc: fix netns refcnt leak")
Reported-by: Erik Hugne <erik.hugne@ericsson.com>
Signed-off-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/server.c