Re: [PATCH 1/1] lockdep: Enable PROVE_RAW_LOCK_NESTING with PROVE_LOCKING.

From: Guenter Roeck
Date: Sat Nov 23 2024 - 11:27:17 EST


On Wed, Oct 09, 2024 at 05:45:03PM +0200, Sebastian Andrzej Siewior wrote:
> With the printk issues solved, the last known splat created by
> PROVE_RAW_LOCK_NESTING is gone.
>
> Enable PROVE_RAW_LOCK_NESTING by default as part of PROVE_LOCKING. Keep
> the defines around in case something serious pops up and it needs to be
> disabled.
>

On sparc64:

=============================
[ BUG: Invalid wait context ]
6.12.0+ #1 Not tainted
-----------------------------
swapper/0/1 is trying to lock:
0000000001b61428 (pci_poke_lock){....}-{3:3}, at: pci_config_read16+0x8/0x80
other info that might help us debug this:
context-{5:5}
2 locks held by swapper/0/1:
#0: fffff800042b50f8 (&dev->mutex){....}-{4:4}, at: __driver_attach+0x80/0x160
#1: 0000000001d201a8 (pci_lock){....}-{2:2}, at: pci_bus_read_config_word+0x18/0x80
stack backtrace:
CPU: 0 UID: 0 PID: 1 Comm: swapper/0 Not tainted 6.12.0+ #1
Call Trace:
[<00000000004e3190>] __lock_acquire+0xa50/0x3160
[<00000000004e63a8>] lock_acquire+0xe8/0x340
[<00000000010ea57c>] _raw_spin_lock_irqsave+0x3c/0x80
[<00000000004434e8>] pci_config_read16+0x8/0x80
[<00000000004440ec>] sun4u_read_pci_cfg+0x12c/0x1a0
[<0000000000b7437c>] pci_bus_read_config_word+0x3c/0x80
[<0000000000b7d878>] pci_find_capability+0x18/0xa0
[<0000000000b772b0>] set_pcie_port_type+0x10/0x160
[<0000000000442758>] pci_of_scan_bus+0x158/0xb00
[<00000000010c0c60>] pci_scan_one_pbm+0xd0/0xf8
[<0000000000445e34>] sabre_probe+0x1f4/0x5c0
[<0000000000c0f9a8>] platform_probe+0x28/0x80
[<0000000000c0d0b8>] really_probe+0xb8/0x340
[<0000000000c0d4e4>] driver_probe_device+0x24/0xe0
[<0000000000c0d70c>] __driver_attach+0x8c/0x160
[<0000000000c0aeb4>] bus_for_each_dev+0x54/0xc0

Is this a problem with the test or with the platform ?

Thanks,
Guenter