Skip to content

Commit 7ff2b7a

Browse files
jhovoldbjorn-helgaas
authored andcommitted
PCI/ASPM: Add pci_disable_link_state_locked() lockdep assert
Add a lockdep assert to pci_disable_link_state_locked() which should only be called with a pci_bus_sem read lock held. Link: https://lore.kernel.org/r/20231128081512.19387-7-johan+linaro@kernel.org Signed-off-by: Johan Hovold <johan+linaro@kernel.org> [bhelgaas: include function name in subject, commit log] Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
1 parent e673d38 commit 7ff2b7a

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/pci/pcie/aspm.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1090,6 +1090,8 @@ static int __pci_disable_link_state(struct pci_dev *pdev, int state, bool locked
10901090

10911091
int pci_disable_link_state_locked(struct pci_dev *pdev, int state)
10921092
{
1093+
lockdep_assert_held_read(&pci_bus_sem);
1094+
10931095
return __pci_disable_link_state(pdev, state, true);
10941096
}
10951097
EXPORT_SYMBOL(pci_disable_link_state_locked);

0 commit comments

Comments
 (0)