summaryrefslogtreecommitdiffstats
path: root/net/unix/af_unix.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-01-08 20:02:31 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-01-08 20:02:31 -0800
commitdde86f41f4cb13015288abcff4706993c007f65d (patch)
tree2e981cfa9eca8bddd5dcef63957f677ad2f7b15b /net/unix/af_unix.c
parent3b2c67de4650a725654cf9bf36e0025ca10442cd (diff)
parent802eee95bde72fd0cd0f3a5b2098375a487d1eda (diff)
Merge v3.13-rc6 into char-misc-next
We want these fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/unix/af_unix.c')
-rw-r--r--net/unix/af_unix.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
index a0ca162e5bd..a427623ee57 100644
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -718,7 +718,9 @@ static int unix_autobind(struct socket *sock)
int err;
unsigned int retries = 0;
- mutex_lock(&u->readlock);
+ err = mutex_lock_interruptible(&u->readlock);
+ if (err)
+ return err;
err = 0;
if (u->addr)
@@ -877,7 +879,9 @@ static int unix_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
goto out;
addr_len = err;
- mutex_lock(&u->readlock);
+ err = mutex_lock_interruptible(&u->readlock);
+ if (err)
+ goto out;
err = -EINVAL;
if (u->addr)