]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: fix nested spinlock hang in aer_inject
authorAndrew Patterson <andrew.patterson@hp.com>
Fri, 22 Jan 2010 21:06:53 +0000 (14:06 -0700)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Mon, 25 Jan 2010 18:42:52 +0000 (10:42 -0800)
commit5214c7fef4050a8925ea44892eef174b1973e7f6
tree1a197e82ad0f6314f0ff0507c04030aaad933c7c
parent8b9ee70592277be2ff0e4f24555d7ba3a200d83f
PCI: fix nested spinlock hang in aer_inject

The aer_inject module hangs in aer_inject() when checking the device's
error masks.  The hang is due to a recursive use of the aer_inject lock.
The aer_inject() routine grabs the lock while processing the error and then
calls pci_read_config_dword to read the masks. The pci_read_config_dword
routine is earlier overridden by pci_read_aer, which among other things,
grabs the aer_inject lock.

Fixed by moving the pci_read_config_dword calls to read the masks to before
the lock is taken.

Acked-by: Huang Ying <ying.huang@intel.com>
Signed-off-by: Andrew Patterson <andrew.patterson@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
drivers/pci/pcie/aer/aer_inject.c