]> git.baikalelectronics.ru Git - kernel.git/commit
net: add a pre-check of net_ns in sk_change_net()
authorGu Zheng <guz.fnst@cn.fujitsu.com>
Mon, 10 Mar 2014 01:57:34 +0000 (09:57 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 10 Mar 2014 20:29:48 +0000 (16:29 -0400)
commit7d57ca9e794e79b08e8074bc97088c814d57c4b7
treea57bf248f7ffba9d37e7999dc3b2c215df999cea
parent8b5e0716e03cd5f8682e799cf57067b9fa784eaf
net: add a pre-check of net_ns in sk_change_net()

We do not need to switch the net_ns if the target net_ns the same
as the current one, so here we add a pre-check of net_ns to avoid
this as David suggested.

Signed-off-by: Gu Zheng <guz.fnst@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/sock.h