Merge remote-tracking branch 'remotes/awilliam/tags/vfio-fixes-20191118.0' into staging

VFIO fixes 2019-11-18

 - Fix migration blocker double free (Michal Privoznik)

 - Use migration_add_blocker() return value (Jens Freimann)

 - Depend on EDID for display support (Paolo Bonzini)

# gpg: Signature made Mon 18 Nov 2019 17:44:52 GMT
# gpg:                using RSA key 239B9B6E3BB08B22
# gpg: Good signature from "Alex Williamson <alex.williamson@redhat.com>" [full]
# gpg:                 aka "Alex Williamson <alex@shazbot.org>" [full]
# gpg:                 aka "Alex Williamson <alwillia@redhat.com>" [full]
# gpg:                 aka "Alex Williamson <alex.l.williamson@gmail.com>" [full]
# Primary key fingerprint: 42F6 C04E 540B D1A9 9E7B  8A90 239B 9B6E 3BB0 8B22

* remotes/awilliam/tags/vfio-fixes-20191118.0:
  vfio: vfio-pci requires EDID
  vfio: don't ignore return value of migrate_add_blocker
  hw/vfio/pci: Fix double free of migration_blocker

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
Peter Maydell
2019-11-18 21:35:48 +00:00
2 changed files with 4 additions and 1 deletions
+1
View File
@@ -6,6 +6,7 @@ config VFIO_PCI
bool
default y
select VFIO
select EDID
depends on LINUX && PCI
config VFIO_CCW
+3 -1
View File
@@ -2737,9 +2737,10 @@ static void vfio_realize(PCIDevice *pdev, Error **errp)
error_setg(&vdev->migration_blocker,
"VFIO device doesn't support migration");
ret = migrate_add_blocker(vdev->migration_blocker, &err);
if (err) {
if (ret) {
error_propagate(errp, err);
error_free(vdev->migration_blocker);
vdev->migration_blocker = NULL;
return;
}
}
@@ -3023,6 +3024,7 @@ error:
if (vdev->migration_blocker) {
migrate_del_blocker(vdev->migration_blocker);
error_free(vdev->migration_blocker);
vdev->migration_blocker = NULL;
}
}