Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Imre Kaloz <kaloz@kernel.org>
To: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Lorenzo Pieralisi <lpieralisi@kernel.org>,
	linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org,
	stable@vger.kernel.org
Subject: [PATCH] MIPS: Octeon: don't mark octeon_pci_pcibios_map_irq() __init
Date: Thu,  3 Dec 2026 11:19:14 +0100	[thread overview]
Message-ID: <20261203101914.4558-1-kaloz@kernel.org> (raw)

The function is called through pcibios_map_irq(), the host bridge
map_irq hook, from pci_assign_irq() when a driver binds to a device.
A PCI driver that probes after init memory is freed, such as a module,
jumps into freed memory and crashes.

Commit 19a8d6b7604d ("MIPS: PCI: Move map_irq() hooks out of initdata")
removed __init from pcibios_map_irq() and octeon_pcie_pcibios_map_irq()
for the same reason, but not from this function.

Fixes: 04c81c7293df ("MIPS: PCI: Replace pci_fixup_irqs() call with host bridge IRQ mapping hooks")
Cc: stable@vger.kernel.org
Signed-off-by: Imre Kaloz <kaloz@kernel.org>
---
 arch/mips/pci/pci-octeon.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/mips/pci/pci-octeon.c b/arch/mips/pci/pci-octeon.c
index 36d12cea3512..9f117c63b608 100644
--- a/arch/mips/pci/pci-octeon.c
+++ b/arch/mips/pci/pci-octeon.c
@@ -231,8 +231,8 @@ const char *octeon_get_pci_interrupts(void)
  *		 as it goes through each bridge.
  * Returns Interrupt number for the device
  */
-int __init octeon_pci_pcibios_map_irq(const struct pci_dev *dev,
-				      u8 slot, u8 pin)
+int octeon_pci_pcibios_map_irq(const struct pci_dev *dev,
+			       u8 slot, u8 pin)
 {
 	int irq_num;
 	const char *interrupts;

base-commit: fe6ff8d5d675c01793b9f051d16055dd4aa75244
-- 
2.47.3


                 reply	other threads:[~2026-12-03 10:19 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20261203101914.4558-1-kaloz@kernel.org \
    --to=kaloz@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=tsbogend@alpha.franken.de \
    /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