aboutsummaryrefslogtreecommitdiffstats
path: root/net/unix/af_unix.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2015-06-02 01:33:25 -0400
committerDavid S. Miller <davem@davemloft.net>2015-06-02 01:51:30 -0400
commitdda922c831d1661c11a3ae1051b7160236f6ffb0 (patch)
tree2fe588dbc4dc90addaabf303713fb2c6af0dc19b /net/unix/af_unix.c
parentdb3397b9aa30d334be237170e048dcd96e1e951d (diff)
parentc46a024ea5eb0165114dbbc8c82c29b7bcf66e71 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts: drivers/net/phy/amd-xgbe-phy.c drivers/net/wireless/iwlwifi/Kconfig include/net/mac80211.h iwlwifi/Kconfig and mac80211.h were both trivial overlapping changes. The drivers/net/phy/amd-xgbe-phy.c file got removed in 'net-next' and the bug fix that happened on the 'net' side is already integrated into the rest of the amd-xgbe driver. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/unix/af_unix.c')
-rw-r--r--net/unix/af_unix.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
index b8c44076c776..f25e1675b865 100644
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -1984,6 +1984,10 @@ static long unix_stream_data_wait(struct sock *sk, long timeo,
1984 unix_state_unlock(sk); 1984 unix_state_unlock(sk);
1985 timeo = freezable_schedule_timeout(timeo); 1985 timeo = freezable_schedule_timeout(timeo);
1986 unix_state_lock(sk); 1986 unix_state_lock(sk);
1987
1988 if (sock_flag(sk, SOCK_DEAD))
1989 break;
1990
1987 clear_bit(SOCK_ASYNC_WAITDATA, &sk->sk_socket->flags); 1991 clear_bit(SOCK_ASYNC_WAITDATA, &sk->sk_socket->flags);
1988 } 1992 }
1989 1993
@@ -2055,6 +2059,10 @@ static int unix_stream_read_generic(struct unix_stream_read_state *state)
2055 struct sk_buff *skb, *last; 2059 struct sk_buff *skb, *last;
2056 2060
2057 unix_state_lock(sk); 2061 unix_state_lock(sk);
2062 if (sock_flag(sk, SOCK_DEAD)) {
2063 err = -ECONNRESET;
2064 goto unlock;
2065 }
2058 last = skb = skb_peek(&sk->sk_receive_queue); 2066 last = skb = skb_peek(&sk->sk_receive_queue);
2059 last_len = last ? last->len : 0; 2067 last_len = last ? last->len : 0;
2060again: 2068again: