summaryrefslogtreecommitdiff
path: root/net/unix/af_unix.c
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2015-06-04 09:04:08 +0300
committerTomi Valkeinen <tomi.valkeinen@ti.com>2015-06-05 16:55:52 +0300
commit8dc0a56529f5d60bbb927049d48245b1a7989bf8 (patch)
treebf1a12dcae17094441e2b4d9a550e212d0d82006 /net/unix/af_unix.c
parent516034787e06834816e9a0435499690704f01c47 (diff)
parent0c534938663af8d2ca2a89bed07e8c0e624352a0 (diff)
downloadlinux-8dc0a56529f5d60bbb927049d48245b1a7989bf8.tar.xz
Merge branch 'ti-dra7-dss' into 4.2/fbdev
Merge arch/ changes for TI's DRA7 SoC Display Subsystem.
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 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) {