mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-06 10:57:46 +00:00
xen/pciback: Check if the device is found instead of blindly assuming so.
Just in case it is not found, don't try to dereference it. [v1: Added WARN_ON, suggested by Jan Beulich <JBeulich@suse.com>] Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
This commit is contained in:
parent
72bf809a19
commit
4645bf3067
1 changed files with 2 additions and 0 deletions
|
@ -220,6 +220,8 @@ void pcistub_put_pci_dev(struct pci_dev *dev)
|
|||
}
|
||||
|
||||
spin_unlock_irqrestore(&pcistub_devices_lock, flags);
|
||||
if (WARN_ON(!found_psdev))
|
||||
return;
|
||||
|
||||
/*hold this lock for avoiding breaking link between
|
||||
* pcistub and xen_pcibk when AER is in processing
|
||||
|
|
Loading…
Reference in a new issue