diff options
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 8664ad0d5797..2ee993c7732a 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c | |||
@@ -529,13 +529,17 @@ static int unix_seqpacket_sendmsg(struct kiocb *, struct socket *, | |||
529 | static int unix_seqpacket_recvmsg(struct kiocb *, struct socket *, | 529 | static int unix_seqpacket_recvmsg(struct kiocb *, struct socket *, |
530 | struct msghdr *, size_t, int); | 530 | struct msghdr *, size_t, int); |
531 | 531 | ||
532 | static void unix_set_peek_off(struct sock *sk, int val) | 532 | static int unix_set_peek_off(struct sock *sk, int val) |
533 | { | 533 | { |
534 | struct unix_sock *u = unix_sk(sk); | 534 | struct unix_sock *u = unix_sk(sk); |
535 | 535 | ||
536 | mutex_lock(&u->readlock); | 536 | if (mutex_lock_interruptible(&u->readlock)) |
537 | return -EINTR; | ||
538 | |||
537 | sk->sk_peek_off = val; | 539 | sk->sk_peek_off = val; |
538 | mutex_unlock(&u->readlock); | 540 | mutex_unlock(&u->readlock); |
541 | |||
542 | return 0; | ||
539 | } | 543 | } |
540 | 544 | ||
541 | 545 | ||