aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/unix/af_unix.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
index e835da8fc09..060bba4567d 100644
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -1637,8 +1637,15 @@ static int unix_dgram_recvmsg(struct kiocb *iocb, struct socket *sock,
1637 mutex_lock(&u->readlock); 1637 mutex_lock(&u->readlock);
1638 1638
1639 skb = skb_recv_datagram(sk, flags, noblock, &err); 1639 skb = skb_recv_datagram(sk, flags, noblock, &err);
1640 if (!skb) 1640 if (!skb) {
1641 unix_state_lock(sk);
1642 /* Signal EOF on disconnected non-blocking SEQPACKET socket. */
1643 if (sk->sk_type == SOCK_SEQPACKET && err == -EAGAIN &&
1644 (sk->sk_shutdown & RCV_SHUTDOWN))
1645 err = 0;
1646 unix_state_unlock(sk);
1641 goto out_unlock; 1647 goto out_unlock;
1648 }
1642 1649
1643 wake_up_interruptible_sync(&u->peer_wait); 1650 wake_up_interruptible_sync(&u->peer_wait);
1644 1651