Commit 760a4322 authored by Rainer Weikusat's avatar Rainer Weikusat Committed by 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: default avatarRainer Weikusat <rweikusat@mobileactivedefense.com>
Fixes: ea3793ee ("core: enable more fine-grained datagram reception control")
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment