diff options
author | Takashi Iwai <tiwai@suse.de> | 2014-01-05 11:19:34 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-01-05 11:19:34 +0100 |
commit | 4b5a5096bb834102b2e821f5f34274f041862d67 (patch) | |
tree | fe55f4f11111e34d503a6a01aeb4bfc2eae5e88a /net/unix/af_unix.c | |
parent | 19570d747795f0ecff79403698b868dc5ad7fa86 (diff) | |
parent | 150116bcfbd9004f01e682535baddaca2b90d3b2 (diff) |
Merge branch 'for-linus' into for-next
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 01625ccc3ae..a0ca162e5bd 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; } |