VFIO fixes for v5.8-rc7
- Fix race with eventfd ctx cleared outside of mutex (Zeng Tao) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (GNU/Linux) iQIcBAABAgAGBQJfFapKAAoJECObm247sIsiow0P/iAD64mdb/oRaaIPms+wtSGi 9d8EDcEJaMRW1VKwLF/ocB58QbsMzvYOqxmAJnVjvv7JmGU4+TFxVojwE0UzHQjB aPp6rrKZzM9KWSsTDPiQT5kA6IHrpZwpFlxeLJvh/j04RizvYFjBfw7EUSLoNdOl LqHFTxQIh1tdLZPsmcT0Fhfo9m6/ToxxUdpP3AVR/tVXm3OOwHz5yZqYH+1k5nDk vIW7WTWk5iCwx8fubbNwwAlF2x51QRHGExqbHPGcKCf+0Vadk5JxjNpewIulMPqW f+T9Y7Gl4Ljapw6T1AlX6l1e9Js0b5I5m1afP83Kuvp8nj7pgSkuUpjlEJivsj1G E7bRHUjkFEBpKhB8txN269E8nOOB3grE0iwMBKgGNh8UjOqqAg1mKIQSDlIiBVjQ OJ9QXHNr1HMKD27QpH36YgkHXXQpjipLQBxUpvBgcp+xYS17T+kfqYJ2a0oAHD0d 8uXOfoJE7CWSMOxnuqm6S6NwFOM0IDtRj6TSRA8qojBGLamqFFUOdavN3+50uPA7 TfKz0RnizsRFxSzDY+31bmDGraqgtbJ6ct2NGRhGE7n86cCdhR+PjSiy66LDwrPm lSCA104gxu/m3Rg3fhZrt6To7CnPdpuhP7B1dTheHPQmvxbbM55H0X27QwqRPX1t NpsULU/13uNZC70siuDV =+prG -----END PGP SIGNATURE----- Merge tag 'vfio-v5.8-rc7' of git://github.com/awilliam/linux-vfio into master Pull VFIO fix from Alex Williamson: "Fix race with eventfd ctx cleared outside of mutex (Zeng Tao)" * tag 'vfio-v5.8-rc7' of git://github.com/awilliam/linux-vfio: vfio/pci: fix racy on error and request eventfd ctx
This commit is contained in:
commit
4fa640dc52
@ -521,14 +521,19 @@ static void vfio_pci_release(void *device_data)
|
||||
vfio_pci_vf_token_user_add(vdev, -1);
|
||||
vfio_spapr_pci_eeh_release(vdev->pdev);
|
||||
vfio_pci_disable(vdev);
|
||||
mutex_lock(&vdev->igate);
|
||||
if (vdev->err_trigger) {
|
||||
eventfd_ctx_put(vdev->err_trigger);
|
||||
vdev->err_trigger = NULL;
|
||||
}
|
||||
mutex_unlock(&vdev->igate);
|
||||
|
||||
mutex_lock(&vdev->igate);
|
||||
if (vdev->req_trigger) {
|
||||
eventfd_ctx_put(vdev->req_trigger);
|
||||
vdev->req_trigger = NULL;
|
||||
}
|
||||
mutex_unlock(&vdev->igate);
|
||||
}
|
||||
|
||||
mutex_unlock(&vdev->reflck->lock);
|
||||
|
Loading…
x
Reference in New Issue
Block a user