diff options
Diffstat (limited to 'net/unix/af_unix.c')
-rw-r--r-- | net/unix/af_unix.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index 1772a0e32665..d1edfa3cad61 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c | |||
@@ -430,7 +430,12 @@ static int unix_dgram_peer_wake_me(struct sock *sk, struct sock *other) | |||
430 | 430 | ||
431 | connected = unix_dgram_peer_wake_connect(sk, other); | 431 | connected = unix_dgram_peer_wake_connect(sk, other); |
432 | 432 | ||
433 | if (unix_recvq_full(other)) | 433 | /* If other is SOCK_DEAD, we want to make sure we signal |
434 | * POLLOUT, such that a subsequent write() can get a | ||
435 | * -ECONNREFUSED. Otherwise, if we haven't queued any skbs | ||
436 | * to other and its full, we will hang waiting for POLLOUT. | ||
437 | */ | ||
438 | if (unix_recvq_full(other) && !sock_flag(other, SOCK_DEAD)) | ||
434 | return 1; | 439 | return 1; |
435 | 440 | ||
436 | if (connected) | 441 | if (connected) |