Linux MIPS Architecture development
 help / color / mirror / Atom feed
* [PATCH] MIPS: Octeon: don't mark octeon_pci_pcibios_map_irq() __init
@ 2026-12-03 10:19 Imre Kaloz
  0 siblings, 0 replies; only message in thread
From: Imre Kaloz @ 2026-12-03 10:19 UTC (permalink / raw)
  To: Thomas Bogendoerfer; +Cc: Lorenzo Pieralisi, linux-kernel, linux-mips, stable

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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-12-03 10:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-03 10:19 [PATCH] MIPS: Octeon: don't mark octeon_pci_pcibios_map_irq() __init Imre Kaloz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox