From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796293159; b=s8yh1WMtMxk/tugF6OEu8uKOVOxqCdxaD1uo54zONGVEqtRgwQMxeL/mcGfW7OfBFs09 AdYwozTWRfzQF6FlJIaX7aYslkvcjl6yqKgskyGLUGj32ywVr3tFxknPd56UjX3w0eEeq yOAataaR58xIA/PHiZonprcUsYD/8E3RQ3cwrw8c5jI+7yg3XB5eTz9iMWS4zgZ1XW0y5 VE1v+l7QRt0ZHe5iA6hqnLAaLNUd3Pd4hoPwIAKTL4wvVq4wousEtxHyBb02ZhJjgbLL6 WfYnjpsqKB2KKCQO+SDlHuSAtvyvEinYsK79BkVbd3PlDzaHa/I3CDHRngEhVqBeGiA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796293159; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: MIME-Version:Content-Transfer-Encoding; bh=kY2WRSpeVUMzzjhVxGEh891IqJDvYB7MZFOfLOlkDYk=; b=Uk7aaQcHBscblv7CDekoHRATW5uhn7gRXEeyPtOtoafk7x/T76QH9DuLzyc3cMlhRaT9 ll0p1YChmQkNNS/D7TyL46y9HeoWPinfAtxCfeVHB87KrCHYP8DIgpSkPVZzz/HOO1Z6w who0XVJlJ2XSjt0Cmxbk0tGcGFkyZ4+tYnJ9LNbao03YH+bPAfFi5m/exppNjBez7CiHe n0kSRBzyPQ1CmK+02nphAnTS5yLWtPVGBSOF/y1xfiZrMcJGIwX4vRhyeyY7JdNneGMzE Tz0ZZK8MFziFUD3DvmXlOgLAW0AhtHz731do+QBge+v9zzNEZ5tDv0UJtrfpvJtGLFg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=E7CBJ0nP; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 985E7606A32C; Thu, 3 Dec 2026 10:19:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=E7CBJ0nP Received: by smtp.kernel.org (Postfix) with ESMTPSA id D75761F000C1; Thu, 3 Dec 2026 10:19:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796293159; bh=kY2WRSpeVUMzzjhVxGEh891IqJDvYB7MZFOfLOlkDYk=; h=From:To:Cc:Subject:Date; b=E7CBJ0nP7C8tPxQEa3zxcbV33+baDxoXO60BH9BRxFYBt8dGDbObSzDUXSPIYU1NP nXnus7l5ck+M7XaKaGPsoldg0eqWZ5ZxsUnwhyW+J04PYOWNXKVJhb+5O2IJwvHa96 4i1C/TwKJZtX0CC76CTmOGRFxAjV0VFrQVC/PG0/L0yxd1EIjxRpRqvKAq7MjwlHxl SEdx3eaCZorVWRClBlMn8mVuMixzFd10AV0sMWHeVNstk0/V0aKQHCQpCyiYgLiblP mQnqr6/OWn0eCl/j4rMkYKcDR8aO+RyMvOo/LBPNqPoTiUM/qcZpVQQJH5SvfznP94 qxfkj1/rC8btA== From: Imre Kaloz To: Thomas Bogendoerfer Cc: Lorenzo Pieralisi , 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 Message-ID: <20261203101914.4558-1-kaloz@kernel.org> X-Mailer: git-send-email 2.47.3 X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 --- 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