* [PATCH net-next] tun: Fixed unsigned/signed comparison
@ 2014-12-26 7:05 Alex Gartrell
2014-12-31 19:15 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Alex Gartrell @ 2014-12-26 7:05 UTC (permalink / raw)
To: davem, herbert; +Cc: netdev, linux-kernel, kernel-team, Alex Gartrell
Validated that this was actually using the unsigned comparison with gdb.
Signed-off-by: Alex Gartrell <agartrell@fb.com>
---
drivers/net/tun.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index a5cbf67..6c63e21 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -1499,7 +1499,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;
}
--
Alex Gartrell <agartrell@fb.com>
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] tun: Fixed unsigned/signed comparison
2014-12-26 7:05 [PATCH net-next] tun: Fixed unsigned/signed comparison Alex Gartrell
@ 2014-12-31 19:15 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2014-12-31 19:15 UTC (permalink / raw)
To: agartrell; +Cc: herbert, netdev, linux-kernel, kernel-team
From: Alex Gartrell <agartrell@fb.com>
Date: Thu, 25 Dec 2014 23:05:03 -0800
> Validated that this was actually using the unsigned comparison with gdb.
>
> Signed-off-by: Alex Gartrell <agartrell@fb.com>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-12-31 19:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-26 7:05 [PATCH net-next] tun: Fixed unsigned/signed comparison Alex Gartrell
2014-12-31 19:15 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).