aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/tun.c
diff options
context:
space:
mode:
authorAlex Gartrell <agartrell@fb.com>2014-12-25 23:05:03 -0800
committerDavid S. Miller <davem@davemloft.net>2014-12-31 14:14:54 -0500
commit87897931c83038af4931990af5b9365b41829921 (patch)
tree1521790c5f2c0ae41c6028e962ca8e88b387da2f /drivers/net/tun.c
parenttipc: replace 0 by NULL for pointers (diff)
downloadlinux-dev-87897931c83038af4931990af5b9365b41829921.tar.xz
linux-dev-87897931c83038af4931990af5b9365b41829921.zip
tun: Fixed unsigned/signed comparison
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>
Diffstat (limited to 'drivers/net/tun.c')
-rw-r--r--drivers/net/tun.c2
1 files changed, 1 insertions, 1 deletions
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;
}