mirror of https://gitee.com/openkylin/linux.git
net/smc: always call the POLL_IN part of sk_wake_async
Wake up reading file descriptors for a closing socket as well, otherwise some socket applications may stall. Signed-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com> Reviewed-by: Thomas Richter <tmricht@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
90cacb2ea6
commit
90e9517ed9
|
@ -36,11 +36,10 @@ static void smc_rx_data_ready(struct sock *sk)
|
||||||
if (skwq_has_sleeper(wq))
|
if (skwq_has_sleeper(wq))
|
||||||
wake_up_interruptible_sync_poll(&wq->wait, POLLIN | POLLPRI |
|
wake_up_interruptible_sync_poll(&wq->wait, POLLIN | POLLPRI |
|
||||||
POLLRDNORM | POLLRDBAND);
|
POLLRDNORM | POLLRDBAND);
|
||||||
|
sk_wake_async(sk, SOCK_WAKE_WAITD, POLL_IN);
|
||||||
if ((sk->sk_shutdown == SHUTDOWN_MASK) ||
|
if ((sk->sk_shutdown == SHUTDOWN_MASK) ||
|
||||||
(sk->sk_state == SMC_CLOSED))
|
(sk->sk_state == SMC_CLOSED))
|
||||||
sk_wake_async(sk, SOCK_WAKE_WAITD, POLL_HUP);
|
sk_wake_async(sk, SOCK_WAKE_WAITD, POLL_HUP);
|
||||||
else
|
|
||||||
sk_wake_async(sk, SOCK_WAKE_WAITD, POLL_IN);
|
|
||||||
rcu_read_unlock();
|
rcu_read_unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue