Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp3874917pxb; Mon, 21 Feb 2022 07:26:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJyun4bUsWm/yYdyxk6CUGqmX2YdPvtV5bv4ziLTZR9pvSJ9RiJoxBE3JolvwF18qAA8qG3p X-Received: by 2002:a05:6a00:1ac6:b0:4bd:140:626c with SMTP id f6-20020a056a001ac600b004bd0140626cmr20388061pfv.7.1645457169783; Mon, 21 Feb 2022 07:26:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645457169; cv=none; d=google.com; s=arc-20160816; b=WspPA9ph2+tjLiA/sdFyYJ2L5UfIcIHBuWFHgpojHM+l5gpfuxip7SUe/RHBb3WHyK uADjeP8M3+qeMRWcw2ywTgdWuYn+TfyUmZaVkN3t/HTRg9wY8tfBjzCvGmw9Fb4NLXhZ q5qtscGYuCRX7Qc3pkfFPjlSNvSElsMyiBw9tg4NFZ6y0um6i8lNKXKE3JVjIDT72erq yJ6a8jcVF5mMtO8STWL1w6JOcY1w1p7pijwYP7WtRBeBatwZL0IV94HXGH9kjHoheJ3C o4pbKDYEyjjEIPx5b53I8CL6HJe9ECuIUsPv9va97pwSuo6+ZJqZwl6rSp62EZilp5Y+ oELA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=iWki4B9CH0k4/RX2ZYtiENtHXmmwQs+D3hWzmlodasU=; b=pC4RSLYtXG8tko+pSPE5embIDdPIv3D8DzTzSe7DcDDzMPFkMFjVjwK/1UeBG39UU4 toDtXFRm2DZ0qFXAmnABhag/lTS0Q78iVIKdxm/SdvNmoNatZxbnYrGFbw8KIozgwybi Ikl2ToPc4c0r/BnGRC5crrlFpugmEaHVRbNUUfJAU6T99YtNy16EJldU5jCnW3Z6fL8z onEfDJ7YjMNm7USP9T/GqgFUNbCaWyou5I30Yo5Gh4Ss515Gs5r6ao+Z10UotCYVpHBV mwVMRAsdDg196MSXkfqsjARvBtXQvSI0OCno1hdl6abIvRe1ljearml7nLH5WjM80g/4 XeOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=1Q+DpLYs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g3si9841867plp.140.2022.02.21.07.25.53; Mon, 21 Feb 2022 07:26:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=1Q+DpLYs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352278AbiBUJyU (ORCPT + 99 others); Mon, 21 Feb 2022 04:54:20 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:42752 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352248AbiBUJrQ (ORCPT ); Mon, 21 Feb 2022 04:47:16 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D2CCC41639; Mon, 21 Feb 2022 01:19:14 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 701FE60F4E; Mon, 21 Feb 2022 09:19:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 58FD0C340EB; Mon, 21 Feb 2022 09:19:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1645435153; bh=06AEE+dTILRtwDY8oQbRofaIwu30iB9WUEgyuAH6rvs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1Q+DpLYsLywg7KMgsOHUY8euPwfPTEpRtHuGVUr+V8/3N9ANTiZZ+sDI4iKAAtJCQ 3leRcox1hkgqOFTbRsIRobH2fK/baSZ3mDH6m3lvAfya84iUrDrRRkLixQtbkVAhIO RADhiYtLbSsQaJH8s1W8VQ+/jMCu/umIsAlMf5bs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, kernel test robot , Dan Carpenter , Steen Hegelund , Jakub Kicinski , Sasha Levin Subject: [PATCH 5.16 063/227] net: sparx5: do not refer to skb after passing it on Date: Mon, 21 Feb 2022 09:48:02 +0100 Message-Id: <20220221084936.969692755@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220221084934.836145070@linuxfoundation.org> References: <20220221084934.836145070@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Steen Hegelund [ Upstream commit 81eb8b0b18789e647e65579303529fd52d861cc2 ] Do not try to use any SKB fields after the packet has been passed up in the receive stack. Reported-by: kernel test robot Reported-by: Dan Carpenter Signed-off-by: Steen Hegelund Link: https://lore.kernel.org/r/20220202083039.3774851-1-steen.hegelund@microchip.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/microchip/sparx5/sparx5_packet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_packet.c b/drivers/net/ethernet/microchip/sparx5/sparx5_packet.c index dc7e5ea6ec158..148d431fcde42 100644 --- a/drivers/net/ethernet/microchip/sparx5/sparx5_packet.c +++ b/drivers/net/ethernet/microchip/sparx5/sparx5_packet.c @@ -145,9 +145,9 @@ static void sparx5_xtr_grp(struct sparx5 *sparx5, u8 grp, bool byte_swap) skb_put(skb, byte_cnt - ETH_FCS_LEN); eth_skb_pad(skb); skb->protocol = eth_type_trans(skb, netdev); - netif_rx(skb); netdev->stats.rx_bytes += skb->len; netdev->stats.rx_packets++; + netif_rx(skb); } static int sparx5_inject(struct sparx5 *sparx5, -- 2.34.1