portid may be 0, thus bound will set the flag to false for in-kernel created netlink sockets.
Fixes: da314c9923fed55 ("netlink: Replace rhash_portid with bound") Cc: Herbert Xu <herb...@gondor.apana.org.au> Signed-off-by: Hannes Frederic Sowa <han...@stressinduktion.org> --- This patch should not affect anything and is just meant to close this loophole in future. I based it on net, but you can also apply it to net-next. net/netlink/af_netlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index 59651af8cc2705..278e94c3c7f6d1 100644 --- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c @@ -1137,7 +1137,7 @@ static int netlink_insert(struct sock *sk, u32 portid) /* We need to ensure that the socket is hashed and visible. */ smp_wmb(); - nlk_sk(sk)->bound = portid; + nlk_sk(sk)->bound = true; err: release_sock(sk); -- 2.5.0 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html