diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-12-17 04:36:37 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-12-17 04:36:37 +0400 |
commit | 6a8c62f3e97fdf184fde60bc99155476e8e9cd55 (patch) | |
tree | 71b818d584f79baf1a192df65c758a592a63360d /net/unix/af_unix.c | |
parent | b46d0c46ccaa366a5bb8ac709fdf2bcaa76221fd (diff) | |
parent | 319e2e3f63c348a9b66db4667efa73178e18b17d (diff) | |
download | linux-6a8c62f3e97fdf184fde60bc99155476e8e9cd55.tar.xz |
Merge 3.13-rc4 into tty-next
We want the fixes in here as well.
Diffstat (limited to 'net/unix/af_unix.c')
-rw-r--r-- | net/unix/af_unix.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index 01625ccc3ae6..a0ca162e5bd5 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c @@ -530,13 +530,17 @@ static int unix_seqpacket_sendmsg(struct kiocb *, struct socket *, static int unix_seqpacket_recvmsg(struct kiocb *, struct socket *, struct msghdr *, size_t, int); -static void unix_set_peek_off(struct sock *sk, int val) +static int unix_set_peek_off(struct sock *sk, int val) { struct unix_sock *u = unix_sk(sk); - mutex_lock(&u->readlock); + if (mutex_lock_interruptible(&u->readlock)) + return -EINTR; + sk->sk_peek_off = val; mutex_unlock(&u->readlock); + + return 0; } |