diff options
author | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2014-12-03 16:40:32 -0500 |
---|---|---|
committer | David Vrabel <david.vrabel@citrix.com> | 2014-12-04 12:42:02 +0000 |
commit | b1df4a56bf4a61113e8928f932d346bed6eef553 (patch) | |
tree | 5cf357104c15548775dec5b67c7540ca0976881b /mm/slab.c | |
parent | 98d9b271250bd83337e3ed66d63e7deefcda8712 (diff) | |
download | linux-b1df4a56bf4a61113e8928f932d346bed6eef553.tar.bz2 |
xen/pciback: Restore configuration space when detaching from a guest.
The commit "xen/pciback: Don't deadlock when unbinding." was using
the version of pci_reset_function which would lock the device lock.
That is no good as we can dead-lock. As such we swapped to using
the lock-less version and requiring that the callers
of 'pcistub_put_pci_dev' take the device lock. And as such
this bug got exposed.
Using the lock-less version is OK, except that we tried to
use 'pci_restore_state' after the lock-less version of
__pci_reset_function_locked - which won't work as 'state_saved'
is set to false. Said 'state_saved' is a toggle boolean that
is to be used by the sequence of a) pci_save_state/pci_restore_state
or b) pci_load_and_free_saved_state/pci_restore_state. We don't
want to use a) as the guest might have messed up the PCI
configuration space and we want it to revert to the state
when the PCI device was binded to us. Therefore we pick
b) to restore the configuration space.
We restore from our 'golden' version of PCI configuration space, when an:
- Device is unbinded from pciback
- Device is detached from a guest.
Reported-by: Sander Eikelenboom <linux@eikelenboom.it>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Diffstat (limited to 'mm/slab.c')
0 files changed, 0 insertions, 0 deletions