Currently we use several locks to avoid racing conditions in pci framework. When involving more than one lock, the inconsistent lock order will lead to deadlock problems. This patchset aims to solve the problem by keeping the same lock order in different processes. Patch_1: fix the potential deadlock caused by pci_dev_lock() and VF enable routine. Patch_2: fix the deadlock caused by AER and sriov enable routine as reported. Yicong Yang (2): PCI: Change lock order in pci_dev_lock() PCI/AER: Fix deadlock triggered by AER and sriov enable routine drivers/pci/bus.c | 8 ++++++++ drivers/pci/pci.c | 15 ++++++++------- drivers/pci/pci.h | 4 ++++ drivers/pci/pcie/err.c | 18 +++++------------- 4 files changed, 25 insertions(+), 20 deletions(-) -- 2.8.1