From mboxrd@z Thu Jan 1 00:00:00 1970 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 03F15C77B73 for ; Mon, 24 Apr 2023 13:26:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232200AbjDXN0O (ORCPT ); Mon, 24 Apr 2023 09:26:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52832 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232187AbjDXN0N (ORCPT ); Mon, 24 Apr 2023 09:26:13 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A52585FC9 for ; Mon, 24 Apr 2023 06:26:10 -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 40CC5622C0 for ; Mon, 24 Apr 2023 13:26:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 57293C433D2; Mon, 24 Apr 2023 13:26:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1682342769; bh=P0xJhcuAssd8RHsInJt2RU/uIv5ybb1GJ8G93bcavV0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GxigpduNk+AK+/x+OgIPlZacKzvdN6bufx4g+mAteAI9g0hzOinvE/aj/ZPGxJEts CIJgTKy0KLsHfBCufgKxN2g5O5lOainrx6ZTOL4p3LBPAqLJ5eW2Q+6M5KVvcjq0Lo nuWjE6Gq1pjl5bPqZ5Jp0MbZIbMKcayWeslBCdxQ= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Aleksandr Loktionov , Tony Nguyen , Sasha Levin , Pucha Himasekhar Reddy Subject: [PATCH 6.1 21/98] i40e: fix i40e_setup_misc_vector() error handling Date: Mon, 24 Apr 2023 15:16:44 +0200 Message-Id: <20230424131134.726683185@linuxfoundation.org> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230424131133.829259077@linuxfoundation.org> References: <20230424131133.829259077@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Aleksandr Loktionov [ Upstream commit c86c00c6935505929cc9adb29ddb85e48c71f828 ] Add error handling of i40e_setup_misc_vector() in i40e_rebuild(). In case interrupt vectors setup fails do not re-open vsi-s and do not bring up vf-s, we have no interrupts to serve a traffic anyway. Fixes: 41c445ff0f48 ("i40e: main driver core") Signed-off-by: Aleksandr Loktionov Tested-by: Pucha Himasekhar Reddy (A Contingent worker at Intel) Signed-off-by: Tony Nguyen Signed-off-by: Sasha Levin --- drivers/net/ethernet/intel/i40e/i40e_main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c index a3119a180a346..68f390ce4f6e2 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_main.c +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c @@ -11058,8 +11058,11 @@ static void i40e_rebuild(struct i40e_pf *pf, bool reinit, bool lock_acquired) pf->hw.aq.asq_last_status)); } /* reinit the misc interrupt */ - if (pf->flags & I40E_FLAG_MSIX_ENABLED) + if (pf->flags & I40E_FLAG_MSIX_ENABLED) { ret = i40e_setup_misc_vector(pf); + if (ret) + goto end_unlock; + } /* Add a filter to drop all Flow control frames from any VSI from being * transmitted. By doing so we stop a malicious VF from sending out -- 2.39.2