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:
886eaa1
)
tun: Fixed unsigned/signed comparison
author
Alex Gartrell
<agartrell@fb.com>
Fri, 26 Dec 2014 07:05:03 +0000
(23:05 -0800)
committer
David S. Miller
<davem@davemloft.net>
Wed, 31 Dec 2014 19:14:54 +0000
(14:14 -0500)
Validated that this was actually using the unsigned comparison with gdb.
Signed-off-by: Alex Gartrell <agartrell@fb.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/tun.c
patch
|
blob
|
history
diff --git
a/drivers/net/tun.c
b/drivers/net/tun.c
index 8c8dc16839a79473e976d9de2132cc6df911e418..df5e948718447f7dfd2631574feca959103807fe 100644
(file)
--- a/
drivers/net/tun.c
+++ b/
drivers/net/tun.c
@@
-1501,7
+1501,7
@@
static int tun_recvmsg(struct kiocb *iocb, struct socket *sock,
goto out;
}
ret = tun_do_read(tun, tfile, &m->msg_iter, flags & MSG_DONTWAIT);
- if (ret > total_len) {
+ if (ret >
(ssize_t)
total_len) {
m->msg_flags |= MSG_TRUNC;
ret = flags & MSG_TRUNC ? ret : total_len;
}