Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964888AbbLGXbL (ORCPT ); Mon, 7 Dec 2015 18:31:11 -0500 Received: from tiger.mobileactivedefense.com ([217.174.251.109]:60729 "EHLO tiger.mobileactivedefense.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755719AbbLGXbJ (ORCPT ); Mon, 7 Dec 2015 18:31:09 -0500 From: Rainer Weikusat To: David Miller Cc: rweikusat@mobileactivedefense.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] fix inverted test in __skb_recv_datagram In-Reply-To: <874mft7sur.fsf_-_@doppelsaurus.mobileactivedefense.com> (Rainer Weikusat's message of "Mon, 07 Dec 2015 23:15:56 +0000") References: <874mfv7055.fsf@doppelsaurus.mobileactivedefense.com> <20151206.233038.1580536748391971635.davem@davemloft.net> <874mft7sur.fsf_-_@doppelsaurus.mobileactivedefense.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) Date: Mon, 07 Dec 2015 23:30:58 +0000 Message-ID: <87vb8925vx.fsf_-_@doppelsaurus.mobileactivedefense.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (tiger.mobileactivedefense.com [217.174.251.109]); Mon, 07 Dec 2015 23:31:05 +0000 (GMT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 832 Lines: 25 As the kernel generally uses negated error numbers, *err needs to be compared with -EAGAIN (d'oh). Signed-off-by: Rainer Weikusat Fixes: ea3793ee29d3 --- diff --git a/net/core/datagram.c b/net/core/datagram.c index 7daff66..fa9dc64 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)); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/