Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp827804rwb; Mon, 26 Sep 2022 06:25:11 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5geXIKixIGuu3NjScaodSbH1lO3pyVW2UVG1NB/2R/xWg0z84DRCt7FgQicbTE+xKEKCCT X-Received: by 2002:a17:907:60c6:b0:77c:e7ee:67c with SMTP id hv6-20020a17090760c600b0077ce7ee067cmr18182872ejc.425.1664198710796; Mon, 26 Sep 2022 06:25:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664198710; cv=none; d=google.com; s=arc-20160816; b=0awPfQzFOsRW4Rlj9X8A9v7TUhWGPoGB8DZ1RQtBGY9TS+tsLYXJkX4Wvn7VHJkbOq 6lQCWnO69ITASaFdrxx/U/NATY9yQTlRxQP1KpW6jILTNyTDeWjphR5JMZQKXXqDUW6x LmqA8H2nKAJcfa17UHEnztdMYnijMfB4CExBnAp/ssTaD6wVe+FJEx1i31VFAtuEsBG5 TbBFWHAy24KUoAksfZgGRPhPqSqKzThhYhxqXLVl1/sKcZcCB32zL4NlX7PhvHXgDcSX FrXGOMO47YU4E885MisQJSPCFHILd7kMe2Pz4o4cG6rbrvhKMiv7fjf+nI6ouUsPKV2I feng== 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=PFllPjqWeoGHp53IoSIZVc5/3YNWKkC2sJlgxdvTSKU=; b=cvTgyPChB8C5lt5fAVmjMmHSwXUoGVGLmeZcdzMCUJO8hN+TYYI+rMmr93z6AnHGkW 5O208l1ap7+Ie3xVcKOrh6U8vE7abaJ8JMBNney+8mhUkJoMfI1hD8EhUvOm0H/TTwMU IlRBDGesM+aYRqmJeR5lGVkM0cAMmce5jTLisHEqP3Di7On8aAE/320vDuPDGjxEWYXW woHYmxN2AYllbaQ/F5ZX+1vjv4ba13ODdMdsvvoVgny/SKOPdfjGhfW8hgxs0o7Sf4SI TX1HiLCkwrVFzNyOXF+idKwOjcTxIXhIi5aVh7UwRdh2sKEv8SYhRNk7V0SoHJTaniX9 JEbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=KfRlPvmW; 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 b8-20020a056402350800b004539c6d849bsi17045019edd.171.2022.09.26.06.24.45; Mon, 26 Sep 2022 06:25:10 -0700 (PDT) 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=KfRlPvmW; 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 S238839AbiIZLtm (ORCPT + 99 others); Mon, 26 Sep 2022 07:49:42 -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: 8bit X-Spam-Status: No, score=-7.2 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 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: Íñigo 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: Íñigo 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 *skb, * 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; } -- 2.35.1