Message ID | 1445434184.22974.50.camel@edumazet-glaptop2.roam.corp.google.com |
---|---|
State | RFC, archived |
Delegated to: | David Miller |
Headers | show |
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index 94f658235fb4..24dec8bb571d 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c @@ -328,7 +328,8 @@ found: static inline int unix_writable(struct sock *sk) { - return (atomic_read(&sk->sk_wmem_alloc) << 2) <= sk->sk_sndbuf; + return sk->sk_state != TCP_LISTEN && + (atomic_read(&sk->sk_wmem_alloc) << 2) <= sk->sk_sndbuf; } static void unix_write_space(struct sock *sk)