From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 42D6D3FA5F0; Wed, 30 Sep 2026 16:28:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790785734; cv=none; b=eoVNqJ5TQu3ofD7b2UcciUdoC+ybf9Rbi9rdlwgRVpQnkUZPDWqlfrksX9W77lYOQFV49xeA4PLYaLlF/4/Y+6Aedygy0hy/TSOEOoLBIW1kRUcG+uwVBNKiWQV9+QvXSgioVecTQMrVhc1ZlJ+Kj3tr9jg2mT9/RhvvF3zGi3M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790785734; c=relaxed/simple; bh=J5w5r16vF5pdZtm/UImmYOBhAxRXqzUvDPmLZnTi2XI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=jXx4cIq2kkM8nU+JXB0kP4/V3DWXPwrJWfsHQ3PYXuqiqCLbqW4JrxntsORn5n86BgsUTpYramMHF0SVsPtwWO0K1wDgF5DUQpQ9NzWtBMNLE0HSt9Vl3tU2DI1287FNS7ZRT4xIE08Kw+6f2UC9IvJeugfMEtTMoqzM4ud62ss= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=fIBiGrAm; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="fIBiGrAm" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9DCEB1F000FF; Wed, 30 Sep 2026 16:28:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1790785733; bh=tvjtFsGaHjfXLn5fv/2/XzgsQV7Yura5JfhrITTTnBo=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=fIBiGrAm0JnHGovZxQ5yAa5YlvcFmylpqf0K/H7ataAfI+oS8ML0ZbGLiwfRja4gv LoAaYSKIyBIh//DASg2IBphT3bFEdeT0W70Pu3IWtcqiX57Yqbu8sxq4gJYPpra6jU Vtbz150/G4/wuBGwIQW1m6FcD5cBhcyVUODAZnhM= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Peng Hao , Johannes Berg , Sasha Levin Subject: [PATCH 6.1 613/982] wifi: mwifiex: fix IRQ leak using wrong index in MSI-X error path Date: Wed, 30 Sep 2026 17:22:29 +0200 Message-ID: <20260930152429.942673558@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260930152416.775402466@linuxfoundation.org> References: <20260930152416.775402466@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Peng Hao [ Upstream commit a3d722190cdef18da4878b5efc27c3c386dda248 ] mwifiex_pcie_request_irq() registers each MSI-X vector with a per-index dev_id (&card->msix_ctx[i]). On a request_irq() failure the cleanup loop "for (j = 0; j < i; j++)" frees msix_entries[j].vector but passes the failed index's &card->msix_ctx[i] as the dev_id. free_irq() matches on (irq, dev_id), so it fails to find the action registered with &card->msix_ctx[j]: the already-requested IRQ j is not freed (leaked) and free_irq() warns about freeing a non-existent IRQ. Use &card->msix_ctx[j]. Fixes: 99074fc1e67b ("mwifiex: enable pcie MSIx interrupt mode support") Signed-off-by: Peng Hao Link: https://patch.msgid.link/20260828111531.56723-1-flyingpeng@tencent.com Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin --- drivers/net/wireless/marvell/mwifiex/pcie.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.c b/drivers/net/wireless/marvell/mwifiex/pcie.c index 6697132ecc977..86419669c11bf 100644 --- a/drivers/net/wireless/marvell/mwifiex/pcie.c +++ b/drivers/net/wireless/marvell/mwifiex/pcie.c @@ -3241,7 +3241,7 @@ static int mwifiex_pcie_request_irq(struct mwifiex_adapter *adapter) ret); for (j = 0; j < i; j++) free_irq(card->msix_entries[j].vector, - &card->msix_ctx[i]); + &card->msix_ctx[j]); pci_disable_msix(pdev); } else { mwifiex_dbg(adapter, MSG, "MSIx enabled!"); -- 2.53.0