Re: [PATCH v2 0/6] PCI: Fix deadlocks when enabling ASPM

Johan Hovold
2023-12-07T13:24:15Z

Hi PCI maintainers,

On Tue, Nov 28, 2023 at 09:15:06AM +0100, Johan Hovold wrote:
> The pci_enable_link_state() helper is currently only called from
> pci_walk_bus(), something which can lead to a deadlock as both helpers
> take a pci_bus_sem read lock.
>
> Add a new locked helper which can be called with the read lock held and
> fix up the two current users (the second is new in 6.7-rc1).
>
> Note that there are no users left of the original unlocked variant after
> this series, but I decided to leave it in place for now (e.g. to mirror
> the corresponding helpers to disable link states).
>
> Included are also a couple of related cleanups.

> Johan Hovold (6):
> PCI/ASPM: Add locked helper for enabling link state
> PCI: vmd: Fix deadlock when enabling ASPM
> PCI: qcom: Fix deadlock when enabling ASPM
> PCI: qcom: Clean up ASPM comment
> PCI/ASPM: Clean up disable link state parameter
> PCI/ASPM: Add lockdep assert to link state helper

Could we get this merged for 6.7-rc5? Even if the risk of a deadlock is
not that great, this bug prevents using lockdep on Qualcomm platforms so
that more locking issues can potentially make their way into the kernel.

And for Qualcomm platforms, this is a regression in 6.7-rc1.

Johan

#regzbot introduced: 9f4f3dfad8cf