summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorAlex Gartrell <agartrell@fb.com>2014-12-26 10:05:03 +0300
committerDavid S. Miller <davem@davemloft.net>2014-12-31 22:14:54 +0300
commit87897931c83038af4931990af5b9365b41829921 (patch)
tree1521790c5f2c0ae41c6028e962ca8e88b387da2f /drivers/net
parent886eaa1fe668e75615a48df2ff68e23b762e31e8 (diff)
downloadlinux-87897931c83038af4931990af5b9365b41829921.tar.xz
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')
-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;
}