提交 87897931 编写于 作者: A Alex Gartrell 提交者: David S. Miller

tun: Fixed unsigned/signed comparison

Validated that this was actually using the unsigned comparison with gdb.
Signed-off-by: NAlex Gartrell <agartrell@fb.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册