net: unix: allow bind to fail on mutex lock
authorSasha Levin <sasha.levin@oracle.com>
Fri, 13 Dec 2013 15:54:22 +0000 (10:54 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Jan 2014 23:28:48 +0000 (15:28 -0800)
commit57bc52eb25cff3ddd096598bf40e9be7673eb83a
tree8f7532908125414ad662d5d0d050dec2c21f22ea
parent36ffb5708649eb5215c14548d692406bc287cb24
net: unix: allow bind to fail on mutex lock

[ Upstream commit 37ab4fa7844a044dc21fde45e2a0fc2f3c3b6490 ]

This is similar to the set_peek_off patch where calling bind while the
socket is stuck in unix_dgram_recvmsg() will block and cause a hung task
spew after a while.

This is also the last place that did a straightforward mutex_lock(), so
there shouldn't be any more of these patches.

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/unix/af_unix.c