forked from Minki/linux
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>
This commit is contained in:
parent
886eaa1fe6
commit
87897931c8
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user