提交 760a4322 编写于 作者: R Rainer Weikusat 提交者: David S. Miller

net: Fix inverted test in __skb_recv_datagram

As the kernel generally uses negated error numbers, *err needs to be
compared with -EAGAIN (d'oh).
Signed-off-by: NRainer Weikusat <rweikusat@mobileactivedefense.com>
Fixes: ea3793ee ("core: enable more fine-grained datagram reception control")
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 e72c932d
......@@ -275,7 +275,7 @@ struct sk_buff *__skb_recv_datagram(struct sock *sk, unsigned int flags,
if (skb)
return skb;
if (*err != EAGAIN)
if (*err != -EAGAIN)
break;
} while (timeo &&
!__skb_wait_for_more_packets(sk, err, &timeo, last));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册