Commit 1ccfa90
PCI: tegra: Convert struct tegra_msi mask_lock into raw spinlock
commit 26fda92d3b56bf44a02bcb4001c5a5548e0ae8ee upstream.
The tegra_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 tegra_msi_irq_unmask().
Since the &desc->lock descriptor lock is a raw spinlock, and the tegra_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: 2c99e55 ("PCI: tegra: Convert to MSI domains")
Reported-by: Geert Uytterhoeven <geert+renesas@glider.be>
Closes: https://patchwork.kernel.org/project/linux-pci/patch/20250909162707.13927-2-marek.vasut+renesas@mailbox.org/#26574451
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>
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20250922150811.88450-1-marek.vasut+renesas@mailbox.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 7a9dee3e4c9d35fc30abbe2742c268ae4711a60f)1 parent d02abed commit 1ccfa90
1 file changed
+13
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
269 | 270 | | |
270 | 271 | | |
271 | 272 | | |
272 | | - | |
| 273 | + | |
273 | 274 | | |
274 | 275 | | |
275 | 276 | | |
| |||
1604 | 1605 | | |
1605 | 1606 | | |
1606 | 1607 | | |
1607 | | - | |
1608 | 1608 | | |
1609 | 1609 | | |
1610 | | - | |
1611 | | - | |
1612 | | - | |
1613 | | - | |
1614 | | - | |
| 1610 | + | |
| 1611 | + | |
| 1612 | + | |
| 1613 | + | |
| 1614 | + | |
1615 | 1615 | | |
1616 | 1616 | | |
1617 | 1617 | | |
1618 | 1618 | | |
1619 | 1619 | | |
1620 | 1620 | | |
1621 | 1621 | | |
1622 | | - | |
1623 | 1622 | | |
1624 | 1623 | | |
1625 | | - | |
1626 | | - | |
1627 | | - | |
1628 | | - | |
1629 | | - | |
| 1624 | + | |
| 1625 | + | |
| 1626 | + | |
| 1627 | + | |
| 1628 | + | |
1630 | 1629 | | |
1631 | 1630 | | |
1632 | 1631 | | |
| |||
1742 | 1741 | | |
1743 | 1742 | | |
1744 | 1743 | | |
1745 | | - | |
| 1744 | + | |
1746 | 1745 | | |
1747 | 1746 | | |
1748 | 1747 | | |
| |||
0 commit comments