projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
09579ac
)
net/smc: add receive timeout check
author
Hans Wippel
<
[email protected]
>
Thu, 21 Sep 2017 07:16:27 +0000
(09:16 +0200)
committer
David S. Miller
<
[email protected]
>
Thu, 21 Sep 2017 22:31:02 +0000
(15:31 -0700)
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]
>
net/smc/smc_rx.c
patch
|
blob
|
history
diff --git
a/net/smc/smc_rx.c
b/net/smc/smc_rx.c
index b17a333e9bb0733893d9e44d92fc7ddf2f75ffbf..3e631ae4b6b65f1ac9f32e5a22d6fdc5b294519f 100644
(file)
--- a/
net/smc/smc_rx.c
+++ b/
net/smc/smc_rx.c
@@
-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)) {