summaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorRainer Weikusat <rweikusat@mobileactivedefense.com>2015-12-08 14:47:56 +0000
committerDavid S. Miller <davem@davemloft.net>2015-12-08 11:30:17 -0500
commit760a4322470e3990b14e09bfe80c9c75c77f33dd (patch)
treee3ed3541fd276c74eb95c8ede7ddf225c09567b9 /net/core
parente72c932d3f8a6b56ec9ebad6312504b2e675440a (diff)
downloadlinux-760a4322470e3990b14e09bfe80c9c75c77f33dd.tar.bz2
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: Rainer Weikusat <rweikusat@mobileactivedefense.com> Fixes: ea3793ee29d3 ("core: enable more fine-grained datagram reception control") Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/datagram.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/datagram.c b/net/core/datagram.c
index 7daff66d3d0b..fa9dc6450b08 100644
--- a/net/core/datagram.c
+++ b/net/core/datagram.c
@@ -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));