mirror of
https://github.com/torvalds/linux.git
synced 2026-09-25 21:21:09 -04:00
net/smc: add receive timeout check
The SMC receive function currently lacks a timeout check under the condition that no data were received and no data are available. This patch adds such a check. Signed-off-by: Hans Wippel <[email protected]> Signed-off-by: Ursula Braun <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
committed by
David S. Miller
parent
09579ac803
commit
846e344eb7
@@ -148,6 +148,8 @@ int smc_rx_recvmsg(struct smc_sock *smc, struct msghdr *msg, size_t len,
|
||||
read_done = sock_intr_errno(timeo);
|
||||
break;
|
||||
}
|
||||
if (!timeo)
|
||||
return -EAGAIN;
|
||||
}
|
||||
|
||||
if (!atomic_read(&conn->bytes_to_rcv)) {
|
||||
|
||||
Reference in New Issue
Block a user