* [PATCH] MIPS: Octeon: don't mark octeon_pci_pcibios_map_irq() __init
@ 2026-12-03 10:19 Imre Kaloz
2026-12-05 9:37 ` Thomas Bogendoerfer
0 siblings, 1 reply; 2+ messages 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] 2+ messages in thread* Re: [PATCH] MIPS: Octeon: don't mark octeon_pci_pcibios_map_irq() __init
2026-12-03 10:19 [PATCH] MIPS: Octeon: don't mark octeon_pci_pcibios_map_irq() __init Imre Kaloz
@ 2026-12-05 9:37 ` Thomas Bogendoerfer
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Bogendoerfer @ 2026-12-05 9:37 UTC (permalink / raw)
To: Imre Kaloz; +Cc: Lorenzo Pieralisi, linux-kernel, linux-mips, stable
On Thu, Dec 03, 2026 at 11:19:14AM +0100, Imre Kaloz wrote:
> 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
applied to mips-next
Thomas.
--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-12-05 10:23 UTC | newest]
Thread overview: 2+ messages (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
2026-12-05 9:37 ` Thomas Bogendoerfer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox