Skip to content

Commit

Permalink
net/smc: always call the POLL_IN part of sk_wake_async
Browse files Browse the repository at this point in the history
Wake up reading file descriptors for a closing socket as well, otherwise
some socket applications may stall.

Signed-off-by: Ursula Braun <[email protected]>
Reviewed-by: Thomas Richter <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Ursula Braun authored and davem330 committed Apr 12, 2017
1 parent 90cacb2 commit 90e9517
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions net/smc/smc_rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,10 @@ static void smc_rx_data_ready(struct sock *sk)
if (skwq_has_sleeper(wq))
wake_up_interruptible_sync_poll(&wq->wait, POLLIN | POLLPRI |
POLLRDNORM | POLLRDBAND);
sk_wake_async(sk, SOCK_WAKE_WAITD, POLL_IN);
if ((sk->sk_shutdown == SHUTDOWN_MASK) ||
(sk->sk_state == SMC_CLOSED))
sk_wake_async(sk, SOCK_WAKE_WAITD, POLL_HUP);
else
sk_wake_async(sk, SOCK_WAKE_WAITD, POLL_IN);
rcu_read_unlock();
}

Expand Down

0 comments on commit 90e9517

Please sign in to comment.