Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
	}