From: "tip-bot2 for Haoxiang Li" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Haoxiang Li <lihaoxiang@isrc.iscas.ac.cn>,
Thomas Gleixner <tglx@kernel.org>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: irq/msi] PCI/MSI: Unmap MSI-X region on error
Date: Mon, 26 Jan 2026 08:56:21 -0000 [thread overview]
Message-ID: <176941778179.510.14598280314675299233.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20260125144452.2103812-1-lihaoxiang@isrc.iscas.ac.cn>
The following commit has been merged into the irq/msi branch of tip:
Commit-ID: 1a8d4c6ecb4c81261bcdf13556abd4a958eca202
Gitweb: https://git.kernel.org/tip/1a8d4c6ecb4c81261bcdf13556abd4a958eca202
Author: Haoxiang Li <lihaoxiang@isrc.iscas.ac.cn>
AuthorDate: Sun, 25 Jan 2026 22:44:52 +08:00
Committer: Thomas Gleixner <tglx@kernel.org>
CommitterDate: Mon, 26 Jan 2026 09:46:48 +01:00
PCI/MSI: Unmap MSI-X region on error
msix_capability_init() fails to unmap the MSI-X region if
msix_setup_interrupts() fails.
Add the missing iounmap() for that error path.
[ tglx: Massaged change log ]
Signed-off-by: Haoxiang Li <lihaoxiang@isrc.iscas.ac.cn>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Link: https://patch.msgid.link/20260125144452.2103812-1-lihaoxiang@isrc.iscas.ac.cn
---
drivers/pci/msi/msi.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/pci/msi/msi.c b/drivers/pci/msi/msi.c
index 34d6641..e010ecd 100644
--- a/drivers/pci/msi/msi.c
+++ b/drivers/pci/msi/msi.c
@@ -737,7 +737,7 @@ static int msix_capability_init(struct pci_dev *dev, struct msix_entry *entries,
ret = msix_setup_interrupts(dev, entries, nvec, affd);
if (ret)
- goto out_disable;
+ goto out_unmap;
/* Disable INTX */
pci_intx_for_msi(dev, 0);
@@ -758,6 +758,8 @@ static int msix_capability_init(struct pci_dev *dev, struct msix_entry *entries,
pcibios_free_irq(dev);
return 0;
+out_unmap:
+ iounmap(dev->msix_base);
out_disable:
dev->msix_enabled = 0;
pci_msix_clear_and_set_ctrl(dev, PCI_MSIX_FLAGS_MASKALL | PCI_MSIX_FLAGS_ENABLE, 0);
next prev parent reply other threads:[~2026-01-26 8:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-25 14:44 [PATCH] PCI/MSI: add iounmap in msix_capability_init() Haoxiang Li
2026-01-26 8:56 ` tip-bot2 for Haoxiang Li [this message]
2026-02-06 22:37 ` Bjorn Helgaas
2026-03-10 14:38 ` Guenter Roeck
2026-03-16 17:22 ` Guenter Roeck
2026-06-10 9:19 ` Yuanhe Shu
2026-06-10 19:44 ` Bjorn Helgaas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=176941778179.510.14598280314675299233.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=lihaoxiang@isrc.iscas.ac.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=tglx@kernel.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®