aboutsummaryrefslogtreecommitdiff
path: root/net/unix/af_unix.c
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2013-12-30 12:38:53 +0000
committerMark Brown <broonie@linaro.org>2013-12-30 12:38:53 +0000
commit34f653345018c42cedea89b7f6a4aba3783ebd7b (patch)
tree663f490f3e16571516dbcce7a2cb2f2545f79dee /net/unix/af_unix.c
parent3b58ee13da7510115b66f71c67c9e87b47e9c4aa (diff)
parent319e2e3f63c348a9b66db4667efa73178e18b17d (diff)
Merge tag 'v3.13-rc4' into regmap-core
Needed as a subsequent patch is built on some of the fixes. Linux 3.13-rc4
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 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;
}