diff options
author | 2015-06-11 14:37:45 -0700 | |
---|---|---|
committer | 2015-06-11 14:37:45 -0700 | |
commit | ecdf94da6f91310d08081e05db78a6c997b44e4b (patch) | |
tree | 0528ddc7e2b34046b3bd98dedf89ca7fee40c1ae /net/unix/af_unix.c | |
parent | Merge tag 'samsung-dt-3' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into next/dt (diff) | |
parent | Linux 4.1-rc6 (diff) | |
download | linux-rng-ecdf94da6f91310d08081e05db78a6c997b44e4b.tar.xz linux-rng-ecdf94da6f91310d08081e05db78a6c997b44e4b.zip |
Merge tag 'v4.1-rc6' into next/dt
Linux 4.1-rc6
Conflicts:
arch/arm/boot/dts/zynq-7000.dtsi
Resolution summary:
Mainline had an earlier version of the commit, resolve in favor of the
newer patch in next/dt branch.
Diffstat (limited to 'net/unix/af_unix.c')
-rw-r--r-- | net/unix/af_unix.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index 5266ea7b922b..06430598cf51 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c @@ -1880,6 +1880,10 @@ static long unix_stream_data_wait(struct sock *sk, long timeo, unix_state_unlock(sk); timeo = freezable_schedule_timeout(timeo); unix_state_lock(sk); + + if (sock_flag(sk, SOCK_DEAD)) + break; + clear_bit(SOCK_ASYNC_WAITDATA, &sk->sk_socket->flags); } @@ -1939,6 +1943,10 @@ static int unix_stream_recvmsg(struct socket *sock, struct msghdr *msg, struct sk_buff *skb, *last; unix_state_lock(sk); + if (sock_flag(sk, SOCK_DEAD)) { + err = -ECONNRESET; + goto unlock; + } last = skb = skb_peek(&sk->sk_receive_queue); again: if (skb == NULL) { |