From patchwork Tue Apr 16 12:02:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Barker X-Patchwork-Id: 13631731 X-Patchwork-Delegate: geert@linux-m68k.org Received: from relmlie5.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8FB0E12AAE8; Tue, 16 Apr 2024 12:03:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=210.160.252.171 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713269027; cv=none; b=JCbLsE7i8PCGawI2AtERUUGn+bVqpzfG7Nank2dJn5dDTFO3PanOVy0gg3PTS2YddUv+bWSxjZiFIJnVkaQ6CtDiWitFikGP0RqzWLeyK1Uk9FiLUQ0ok1twzovxhqjtjTDIjBPip2L4oiYKIJmzGN92cX6DhxXb8UrVJsvYCA4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713269027; c=relaxed/simple; bh=uWLHXrTOlJRXQafFBpfvvofP+BoXXDgsFSMQ8DNBvbE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=GimIJSMuuu/AGJNsNo0Sd71ZdUcJ6Ad+XW5ti9x9G20KUIBDSOlwUYEycKqG1+ZdfSrAsdoos3sW4KpbnuqKdNieiNwXTklctcj0KmTypg1V5OGZOCLvo0GFuyCcmVqLpbsQTq4naLSO1FDELEoTfpIKSvjuKP4+iv5wFfvsEv8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=bp.renesas.com; spf=pass smtp.mailfrom=bp.renesas.com; arc=none smtp.client-ip=210.160.252.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=bp.renesas.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bp.renesas.com X-IronPort-AV: E=Sophos;i="6.07,205,1708354800"; d="scan'208";a="201616929" Received: from unknown (HELO relmlir5.idc.renesas.com) ([10.200.68.151]) by relmlie5.idc.renesas.com with ESMTP; 16 Apr 2024 21:03:44 +0900 Received: from renesas-deb12.cephei.uk (unknown [10.226.93.86]) by relmlir5.idc.renesas.com (Postfix) with ESMTP id AA547400C44B; Tue, 16 Apr 2024 21:03:39 +0900 (JST) From: Paul Barker To: Sergey Shtylyov , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , =?utf-8?q?Niklas_S=C3=B6derlund?= , Geert Uytterhoeven Cc: Paul Barker , Claudiu Beznea , Biju Das , YueHaibing , netdev@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [net PATCH v3 3/4] net: ravb: Fix GbEth jumbo packet RX checksum handling Date: Tue, 16 Apr 2024 13:02:53 +0100 Message-Id: <20240416120254.2620-4-paul.barker.ct@bp.renesas.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240416120254.2620-1-paul.barker.ct@bp.renesas.com> References: <20240416120254.2620-1-paul.barker.ct@bp.renesas.com> Precedence: bulk X-Mailing-List: linux-renesas-soc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Sending a 7kB ping packet to the RZ/G2L in v6.9-rc2 causes the following backtrace: WARNING: CPU: 0 PID: 0 at include/linux/skbuff.h:3127 skb_trim+0x30/0x38 Hardware name: Renesas SMARC EVK based on r9a07g044l2 (DT) pc : skb_trim+0x30/0x38 lr : ravb_rx_csum_gbeth+0x40/0x90 Call trace: skb_trim+0x30/0x38 ravb_rx_gbeth+0x56c/0x5cc ravb_poll+0xa0/0x204 __napi_poll+0x38/0x17c This is caused by ravb_rx_gbeth() calling ravb_rx_csum_gbeth() with the wrong skb for a packet which spans multiple descriptors. To fix this, use the correct skb. Fixes: c2da9408579d ("ravb: Add Rx checksum offload support for GbEth") Signed-off-by: Paul Barker Reviewed-by: Sergey Shtylyov --- No changes v2->v3: Changes v1->v2: * Trimmed the call trace in accordance with the docs [1]. * Add Sergey's Reviewed-by tag. [1]: https://docs.kernel.org/process/submitting-patches.html#backtraces-in-commit-messages drivers/net/ethernet/renesas/ravb_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c index 3b870926af14..6969cdeeb67a 100644 --- a/drivers/net/ethernet/renesas/ravb_main.c +++ b/drivers/net/ethernet/renesas/ravb_main.c @@ -843,7 +843,7 @@ static bool ravb_rx_gbeth(struct net_device *ndev, int *quota, int q) priv->rx_1st_skb->protocol = eth_type_trans(priv->rx_1st_skb, ndev); if (ndev->features & NETIF_F_RXCSUM) - ravb_rx_csum_gbeth(skb); + ravb_rx_csum_gbeth(priv->rx_1st_skb); napi_gro_receive(&priv->napi[q], priv->rx_1st_skb); rx_packets++;