From nobody Tue Dec 16 04:27:41 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D2CDBC32771 for ; Mon, 26 Sep 2022 11:49:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238270AbiIZLtq (ORCPT ); Mon, 26 Sep 2022 07:49:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50880 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238773AbiIZLrV (ORCPT ); Mon, 26 Sep 2022 07:47:21 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 67E3B74DF4; Mon, 26 Sep 2022 03:47:45 -0700 (PDT) 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 914FB60A37; Mon, 26 Sep 2022 10:47:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A05CEC433D7; Mon, 26 Sep 2022 10:47:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664189263; bh=ZmKY2Sdv8dFo4Uiq2WCxXNdpELsTk6liyF6+9D2rwtk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KfRlPvmW6vWuNnxcQaNANvcRx1lzIDASPOUaQBKWagv5muZynrNE363GLD93lvwCm AZnJ7cYfiFSPwfljD77QbYen9Yu6oWd2QPDqD86e7DPm8UWa8aeXbz5z41N0PTd1iB eOFRmxUuk2YMrbF595AAN1U7rhvAJ+X5V52FJw6c= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tianhao Zhao , =?UTF-8?q?=C3=8D=C3=B1igo=20Huguet?= , Jakub Kicinski , Sasha Levin Subject: [PATCH 5.19 127/207] sfc/siena: fix null pointer dereference in efx_hard_start_xmit Date: Mon, 26 Sep 2022 12:11:56 +0200 Message-Id: <20220926100812.239218464@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220926100806.522017616@linuxfoundation.org> References: <20220926100806.522017616@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: =C3=8D=C3=B1igo Huguet [ Upstream commit 589c6eded10c77a12b7b2cf235b6b19a2bdb91fa ] Like in previous patch for sfc, prevent potential (but unlikely) NULL pointer dereference. Fixes: 12804793b17c ("sfc: decouple TXQ type from label") Reported-by: Tianhao Zhao Signed-off-by: =C3=8D=C3=B1igo Huguet Link: https://lore.kernel.org/r/20220915141958.16458-1-ihuguet@redhat.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/sfc/siena/tx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/sfc/siena/tx.c b/drivers/net/ethernet/sfc= /siena/tx.c index e166dcb9b99c..91e87594ed1e 100644 --- a/drivers/net/ethernet/sfc/siena/tx.c +++ b/drivers/net/ethernet/sfc/siena/tx.c @@ -336,7 +336,7 @@ netdev_tx_t efx_siena_hard_start_xmit(struct sk_buff *s= kb, * previous packets out. */ if (!netdev_xmit_more()) - efx_tx_send_pending(tx_queue->channel); + efx_tx_send_pending(efx_get_tx_channel(efx, index)); return NETDEV_TX_OK; } =20 --=20 2.35.1