From: Alex Gartrell Date: Fri, 26 Dec 2014 07:05:03 +0000 (-0800) Subject: tun: Fixed unsigned/signed comparison X-Git-Tag: v4.0-rc1~133^2~316 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=87897931c83038af4931990af5b9365b41829921;p=linux.git tun: Fixed unsigned/signed comparison Validated that this was actually using the unsigned comparison with gdb. Signed-off-by: Alex Gartrell Signed-off-by: David S. Miller --- diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 8c8dc16839a7..df5e94871844 100644 --- 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; }