]> git.baikalelectronics.ru Git - kernel.git/commit
netlink: Reset portid after netlink_insert failure
authorHerbert Xu <herbert@gondor.apana.org.au>
Sat, 16 May 2015 13:50:28 +0000 (21:50 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 16 May 2015 21:08:57 +0000 (17:08 -0400)
commit8e6e139f83d4a308b006c3f28843a9ad503a1db0
treef2d676b046893d451555345d93a1bc72af18c2c6
parentb58728b3d578b9ba400974fff1f6366436b838c7
netlink: Reset portid after netlink_insert failure

The commit 05b361868b85a970185b147ba6a2198b3eba0c7c ("netlink:
eliminate nl_sk_hash_lock") breaks the autobind retry mechanism
because it doesn't reset portid after a failed netlink_insert.

This means that should autobind fail the first time around, then
the socket will be stuck in limbo as it can never be bound again
since it already has a non-zero portid.

Fixes: 05b361868b85 ("netlink: eliminate nl_sk_hash_lock")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/netlink/af_netlink.c