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:
5792a28
)
[PATCH] net/sunrpc/svcsock.c: fix a check
author
Adrian Bunk
<
[email protected]
>
Thu, 5 Apr 2007 02:08:21 +0000
(19:08 -0700)
committer
Linus Torvalds
<
[email protected]
>
Thu, 5 Apr 2007 04:12:47 +0000
(21:12 -0700)
The return value of kernel_recvmsg() should be assigned to "err", not
compared with the random value of a never initialized "err" (and the "< 0"
check wrongly always returned false since == comparisons never have a
result < 0).
Spotted by the Coverity checker.
Signed-off-by: Adrian Bunk <
[email protected]
>
Acked-by: Neil Brown <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
net/sunrpc/svcsock.c
patch
|
blob
|
history
diff --git
a/net/sunrpc/svcsock.c
b/net/sunrpc/svcsock.c
index f6e1eb1ea7201dc3796b0058701af81627f7761d..593f62ff8521e1f502f7af6ea68cccd39a7b68fa 100644
(file)
--- a/
net/sunrpc/svcsock.c
+++ b/
net/sunrpc/svcsock.c
@@
-779,8
+779,8
@@
svc_udp_recvfrom(struct svc_rqst *rqstp)
}
clear_bit(SK_DATA, &svsk->sk_flags);
- while ((err =
=
kernel_recvmsg(svsk->sk_sock, &msg, NULL,
-
0, 0, MSG_PEEK | MSG_DONTWAIT)) < 0 ||
+ while ((err = kernel_recvmsg(svsk->sk_sock, &msg, NULL,
+ 0, 0, MSG_PEEK | MSG_DONTWAIT)) < 0 ||
(skb = skb_recv_datagram(svsk->sk_sk, 0, 1, &err)) == NULL) {
if (err == -EAGAIN) {
svc_sock_received(svsk);