From 87897931c83038af4931990af5b9365b41829921 Mon Sep 17 00:00:00 2001 From: Alex Gartrell Date: Thu, 25 Dec 2014 23:05:03 -0800 Subject: [PATCH] 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 --- 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 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; } -- 2.20.1