PCI: rcar-host: Convert struct rcar_msi mask_lock into raw spinlock
[ Upstream commit 5ed35b4d ] The rcar_msi_irq_unmask() function may be called from a PCI driver request_threaded_irq() function. This triggers kernel/irq/manage.c __setup_irq() which locks raw spinlock &desc->lock descriptor lock and with that descriptor lock held, calls rcar_msi_irq_unmask(). Since the &desc->lock descriptor lock is a raw spinlock, and the rcar_msi .mask_lock is not a raw spinlock, this setup triggers 'BUG: Invalid wait context' with CONFIG_PROVE_RAW_LOCK_NESTING=y. Use scoped_guard() to simplify the locking. Fixes: 83ed8d4f ("PCI: rcar: Convert to MSI domains") Reported-by:Duy Nguyen <duy.nguyen.rh@renesas.com> Reported-by:
Thuan Nguyen <thuan.nguyen-hong@banvien.com.vn> Signed-off-by:
Marek Vasut <marek.vasut+renesas@mailbox.org> Signed-off-by:
Manivannan Sadhasivam <mani@kernel.org> Signed-off-by:
Bjorn Helgaas <bhelgaas@google.com> Reviewed-by:
Geert Uytterhoeven <geert+renesas@glider.be> Acked-by:
Marc Zyngier <maz@kernel.org> Cc: stable@vger.kernel.org Link: https://patch.msgid.link/20250909162707.13927-2-marek.vasut+renesas@mailbox.org [ replaced scoped_guard() with explicit raw_spin_lock_irqsave()/raw_spin_unlock_irqrestore() calls ] Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Loading
Please sign in to comment