diff options
author | Ingo Molnar <mingo@kernel.org> | 2015-06-02 02:05:42 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-06-02 02:05:42 -0400 |
commit | f407a8258610169cd8e975dba7f0b2824562014c (patch) | |
tree | 6c87b2d168a4665411a9e16b9f481599f2db25bc /net/unix/af_unix.c | |
parent | 960d447b94b22ceba286917056871d1dac8da697 (diff) | |
parent | c46a024ea5eb0165114dbbc8c82c29b7bcf66e71 (diff) |
Merge branch 'linus' into sched/core, to resolve conflict
Conflicts:
arch/sparc/include/asm/topology_64.h
Signed-off-by: Ingo Molnar <mingo@kernel.org>
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, | |||
1880 | unix_state_unlock(sk); | 1880 | unix_state_unlock(sk); |
1881 | timeo = freezable_schedule_timeout(timeo); | 1881 | timeo = freezable_schedule_timeout(timeo); |
1882 | unix_state_lock(sk); | 1882 | unix_state_lock(sk); |
1883 | |||
1884 | if (sock_flag(sk, SOCK_DEAD)) | ||
1885 | break; | ||
1886 | |||
1883 | clear_bit(SOCK_ASYNC_WAITDATA, &sk->sk_socket->flags); | 1887 | clear_bit(SOCK_ASYNC_WAITDATA, &sk->sk_socket->flags); |
1884 | } | 1888 | } |
1885 | 1889 | ||
@@ -1939,6 +1943,10 @@ static int unix_stream_recvmsg(struct socket *sock, struct msghdr *msg, | |||
1939 | struct sk_buff *skb, *last; | 1943 | struct sk_buff *skb, *last; |
1940 | 1944 | ||
1941 | unix_state_lock(sk); | 1945 | unix_state_lock(sk); |
1946 | if (sock_flag(sk, SOCK_DEAD)) { | ||
1947 | err = -ECONNRESET; | ||
1948 | goto unlock; | ||
1949 | } | ||
1942 | last = skb = skb_peek(&sk->sk_receive_queue); | 1950 | last = skb = skb_peek(&sk->sk_receive_queue); |
1943 | again: | 1951 | again: |
1944 | if (skb == NULL) { | 1952 | if (skb == NULL) { |