From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 92A0D224F6; Tue, 8 Apr 2025 11:10:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744110652; cv=none; b=tzQRntrc7Y3gAZDPcuDecpp0bPfUpxhNcPK+/wv6IGllMn31tYzlCa9ACHc2tJsQJcD7SaQZk1EW141xztvm4ow5ADKyGZ+KrVNsddi04dVY6sOxLZXuUVD01bfy5/fPCz0WzIgOTm9YOVMc45zEkiFpvNqhdtLqKc8afkuuijs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744110652; c=relaxed/simple; bh=7nmYopXUPj+azu868nkjha7U1b25aNr2O/WZFDgbIi8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=calXsSEawTvG8FudQ2n5fqyHBTehlzj8hrmuadBADPUsN+k0f9wlodkpnzURUx/BV+jUWY83/EMRMrPW/Tpm7Lr7eDw4jkk6eUfowIkMubaReqLLZYn4VIygo8DSjauxspgF5s2hBWafddwP4J0gESzs9wLxR4Sj6w6domD9MbU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=v0etUkh4; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="v0etUkh4" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 22681C4CEE5; Tue, 8 Apr 2025 11:10:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1744110652; bh=7nmYopXUPj+azu868nkjha7U1b25aNr2O/WZFDgbIi8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=v0etUkh4SxKgcRWREGD7S0Nw56kDML1oIeRyYGrsml2tcWIgX7UfXo7KdFfraKiqa yE6pmDC862OjWLDXnv7vdBkCZG1fCEbw8eMpp/4IuVhU71RTNvhgHoFOFZrCKFZJa5 3Lp7rBk8gaBh6xIzy7OsuBwVkfHsIH3uN/J48Dtw= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Manivannan Sadhasivam , Baochen Qiang , Jeff Johnson , Sasha Levin Subject: [PATCH 6.14 126/731] wifi: ath12k: Clear affinity hint before calling ath12k_pci_free_irq() in error path Date: Tue, 8 Apr 2025 12:40:23 +0200 Message-ID: <20250408104917.209860885@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250408104914.247897328@linuxfoundation.org> References: <20250408104914.247897328@linuxfoundation.org> User-Agent: quilt/0.68 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.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Manivannan Sadhasivam [ Upstream commit b43b1e2c52db77c872bd60d30cdcc72c47df70c7 ] If a shared IRQ is used by the driver due to platform limitation, then the IRQ affinity hint is set right after the allocation of IRQ vectors in ath12k_pci_msi_alloc(). This does no harm unless one of the functions requesting the IRQ fails and attempt to free the IRQ. This may end up with a warning from the IRQ core that is expecting the affinity hint to be cleared before freeing the IRQ: kernel/irq/manage.c: /* make sure affinity_hint is cleaned up */ if (WARN_ON_ONCE(desc->affinity_hint)) desc->affinity_hint = NULL; So to fix this issue, clear the IRQ affinity hint before calling ath12k_pci_free_irq() in the error path. The affinity will be cleared once again further down the error path due to code organization, but that does no harm. Fixes: a3012f206d07 ("wifi: ath12k: set IRQ affinity to CPU0 in case of one MSI vector") Signed-off-by: Manivannan Sadhasivam Reviewed-by: Baochen Qiang Link: https://patch.msgid.link/20250225053447.16824-3-manivannan.sadhasivam@linaro.org Signed-off-by: Jeff Johnson Signed-off-by: Sasha Levin --- drivers/net/wireless/ath/ath12k/pci.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/wireless/ath/ath12k/pci.c b/drivers/net/wireless/ath/ath12k/pci.c index 06cff3849ab8d..2851f6944b864 100644 --- a/drivers/net/wireless/ath/ath12k/pci.c +++ b/drivers/net/wireless/ath/ath12k/pci.c @@ -1689,6 +1689,8 @@ static int ath12k_pci_probe(struct pci_dev *pdev, return 0; err_free_irq: + /* __free_irq() expects the caller to have cleared the affinity hint */ + ath12k_pci_set_irq_affinity_hint(ab_pci, NULL); ath12k_pci_free_irq(ab); err_ce_free: -- 2.39.5