aboutsummaryrefslogtreecommitdiffstats
path: root/net/phonet/socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/phonet/socket.c')
-rw-r--r--net/phonet/socket.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/phonet/socket.c b/net/phonet/socket.c
index cea1136cbe4..a9c3d1f2e9d 100644
--- a/net/phonet/socket.c
+++ b/net/phonet/socket.c
@@ -220,7 +220,9 @@ static unsigned int pn_socket_poll(struct file *file, struct socket *sock,
220 220
221 if (!skb_queue_empty(&sk->sk_receive_queue)) 221 if (!skb_queue_empty(&sk->sk_receive_queue))
222 mask |= POLLIN | POLLRDNORM; 222 mask |= POLLIN | POLLRDNORM;
223 else if (sk->sk_state == TCP_CLOSE_WAIT) 223 if (!skb_queue_empty(&pn->ctrlreq_queue))
224 mask |= POLLPRI;
225 if (!mask && sk->sk_state == TCP_CLOSE_WAIT)
224 return POLLHUP; 226 return POLLHUP;
225 227
226 if (sk->sk_state == TCP_ESTABLISHED && pn->tx_credits) 228 if (sk->sk_state == TCP_ESTABLISHED && pn->tx_credits)