Commit 87897931 authored by Alex Gartrell's avatar Alex Gartrell Committed by David S. Miller

tun: Fixed unsigned/signed comparison

Validated that this was actually using the unsigned comparison with gdb.
Signed-off-by: default avatarAlex Gartrell <agartrell@fb.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 886eaa1f
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment