From patchwork Mon Jul 1 07:14:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiawen Wu X-Patchwork-Id: 13717607 X-Patchwork-Delegate: kuba@kernel.org Received: from smtpbgau1.qq.com (smtpbgau1.qq.com [54.206.16.166]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E030A80BF8 for ; Mon, 1 Jul 2024 07:15:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=54.206.16.166 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719818132; cv=none; b=jBH5h+Tbwp4fFAT+yy8HzWQonSmlsBRWtJsk0aLaMf/b7qWn3e39vmZvraaVLUCBbzZLhpXgjsKIrs757vDu7wxqxgPEPqrKt/HnULF5ijdBfm9ql2NwnVWyvYaUJmnELabYz4fPXZ3txEvbcStL/ZnJa87AOth4J8hSoZBWg/U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719818132; c=relaxed/simple; bh=Tfj+FNKm1mqgd14cWJEiIiRvYH8dm2bj3v74namcXmw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=CBRatdCOAJquDylsLfuv2LiHGkGfbnf6scYx8U5Jf4RKR5Nnrlf2rlUqDwbC2RRTv4HQ9qzbY+/y/NYrAS0qawoHADvbNEJutdxS7fJoVr4wrzygBoeFGTvWc6hclX3fnD5UEjzyCP5RbV2pfTrez5NKYEoCcSRe9ctnyogcuQc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=trustnetic.com; spf=pass smtp.mailfrom=trustnetic.com; arc=none smtp.client-ip=54.206.16.166 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=trustnetic.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=trustnetic.com X-QQ-mid: bizesmtp86t1719818067tpp6qf1r X-QQ-Originating-IP: 0/obag3gewOf/qdJL2+O0daNKM8S+7d6o54sSqWUl2A= Received: from lap-jiawenwu.trustnetic.com ( [220.184.148.68]) by bizesmtp.qq.com (ESMTP) with id ; Mon, 01 Jul 2024 15:14:25 +0800 (CST) X-QQ-SSF: 0000000000000000000000000000000 X-QQ-GoodBg: 0 X-BIZMAIL-ID: 6412110099789273011 From: Jiawen Wu To: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, horms@kernel.org, andrew@lunn.ch, netdev@vger.kernel.org, przemyslaw.kitszel@intel.com Cc: mengyuanlou@net-swift.com, duanqiangwen@net-swift.com, Jiawen Wu Subject: [PATCH net v3 1/4] net: txgbe: initialize num_q_vectors for MSI/INTx interrupts Date: Mon, 1 Jul 2024 15:14:13 +0800 Message-Id: <20240701071416.8468-2-jiawenwu@trustnetic.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20240701071416.8468-1-jiawenwu@trustnetic.com> References: <20240701071416.8468-1-jiawenwu@trustnetic.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:trustnetic.com:qybglogicsvrgz:qybglogicsvrgz8a-1 X-Patchwork-Delegate: kuba@kernel.org When using MSI/INTx interrupts, wx->num_q_vectors is uninitialized. Thus there will be kernel panic in wx_alloc_q_vectors() to allocate queue vectors. Fixes: 3f703186113f ("net: libwx: Add irq flow functions") Signed-off-by: Jiawen Wu --- drivers/net/ethernet/wangxun/libwx/wx_lib.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/wangxun/libwx/wx_lib.c b/drivers/net/ethernet/wangxun/libwx/wx_lib.c index 68bde91b67a0..f53776877f71 100644 --- a/drivers/net/ethernet/wangxun/libwx/wx_lib.c +++ b/drivers/net/ethernet/wangxun/libwx/wx_lib.c @@ -1686,6 +1686,7 @@ static int wx_set_interrupt_capability(struct wx *wx) } pdev->irq = pci_irq_vector(pdev, 0); + wx->num_q_vectors = 1; return 0; }