From patchwork Thu Sep 11 02:23:18 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Scott Wood X-Patchwork-Id: 388039 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 9F51D14012A for ; Thu, 11 Sep 2014 13:57:53 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752055AbaIKD5t (ORCPT ); Wed, 10 Sep 2014 23:57:49 -0400 Received: from mail-bn1on0112.outbound.protection.outlook.com ([157.56.110.112]:5441 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751596AbaIKD5s (ORCPT ); Wed, 10 Sep 2014 23:57:48 -0400 X-Greylist: delayed 3637 seconds by postgrey-1.27 at vger.kernel.org; Wed, 10 Sep 2014 23:57:48 EDT Received: from snotra.am.freescale.net (192.88.168.50) by BY2PR0301MB0728.namprd03.prod.outlook.com (25.160.63.18) with Microsoft SMTP Server (TLS) id 15.0.1024.12; Thu, 11 Sep 2014 02:23:32 +0000 From: Scott Wood To: , , Tom Herbert CC: Scott Wood Subject: [PATCH] udp: Fix inverted NAPI_GRO_CB(skb)->flush test Date: Wed, 10 Sep 2014 21:23:18 -0500 Message-ID: <1410402198-30811-1-git-send-email-scottwood@freescale.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-Originating-IP: [192.88.168.50] X-ClientProxiedBy: BN1PR02CA0014.namprd02.prod.outlook.com (10.141.56.14) To BY2PR0301MB0728.namprd03.prod.outlook.com (25.160.63.18) X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;UriScan:; X-Forefront-PRVS: 03319F6FEF X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6009001)(199003)(189002)(85306004)(36756003)(19580395003)(4396001)(74502001)(74662001)(50226001)(77156001)(81342001)(64706001)(31966008)(62966002)(83322001)(19580405001)(20776003)(47776003)(76482001)(104166001)(90102001)(77982001)(50986999)(102836001)(21056001)(95666004)(79102001)(46102001)(106356001)(99396002)(105586002)(107046002)(42186005)(101416001)(97736003)(229853001)(77096002)(50466002)(86362001)(92566001)(85852003)(83072002)(88136002)(80022001)(81542001)(66066001)(89996001)(33646002)(48376002)(575784001)(93916002)(92726001)(87976001)(87286001); DIR:OUT; SFP:1102; SCL:1; SRVR:BY2PR0301MB0728; H:snotra.am.freescale.net; FPR:; MLV:sfv; PTR:InfoNoRecords; A:1; MX:1; LANG:en; X-OriginatorOrg: freescale.com Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Commit 2abb7cdc0d ("udp: Add support for doing checksum unnecessary conversion") caused napi_gro_cb structs with the "flush" field zero to take the "udp_gro_receive" path rather than the "set flush to 1" path that they would previously take. As a result I saw booting from an NFS root hang shortly after starting userspace, with "server not responding" messages. This change to the handling of "flush == 0" packets appears to be incidental to the goal of adding new code in the case where skb_gro_checksum_validate_zero_check() returns zero. Based on that and the fact that it breaks things, I'm assuming that it is unintentional. Fixes: 2abb7cdc0d ("udp: Add support for doing checksum unnecessary conversion") Cc: Tom Herbert Signed-off-by: Scott Wood Acked-by: Eric Dumazet --- net/ipv4/udp_offload.c | 2 +- net/ipv6/udp_offload.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/net/ipv4/udp_offload.c b/net/ipv4/udp_offload.c index 84e0e05..b8c845a 100644 --- a/net/ipv4/udp_offload.c +++ b/net/ipv4/udp_offload.c @@ -294,7 +294,7 @@ static struct sk_buff **udp4_gro_receive(struct sk_buff **head, goto flush; /* Don't bother verifying checksum if we're going to flush anyway. */ - if (!NAPI_GRO_CB(skb)->flush) + if (NAPI_GRO_CB(skb)->flush) goto skip; if (skb_gro_checksum_validate_zero_check(skb, IPPROTO_UDP, uh->check, diff --git a/net/ipv6/udp_offload.c b/net/ipv6/udp_offload.c index 89cb9a9..2907fb8 100644 --- a/net/ipv6/udp_offload.c +++ b/net/ipv6/udp_offload.c @@ -138,7 +138,7 @@ static struct sk_buff **udp6_gro_receive(struct sk_buff **head, goto flush; /* Don't bother verifying checksum if we're going to flush anyway. */ - if (!NAPI_GRO_CB(skb)->flush) + if (NAPI_GRO_CB(skb)->flush) goto skip; if (skb_gro_checksum_validate_zero_check(skb, IPPROTO_UDP, uh->check,