Re: [PATCH 02/20] libxl: Fix possible deadlock in libxlDomainMigrateBegin3Params

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 03/09/2018 03:33 PM, Jim Fehlig wrote:
On 03/09/2018 09:47 AM, John Ferlan wrote:
Commit id '45697fe5' added a check for "Domain-0" to generate
an error during libxlDomainMigrateBegin3Params; however, by
returning NULL, the @vm was left locked since libxlDomObjFromDomain
returns a locked @vm.

Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx>
---
  src/libxl/libxl_driver.c | 7 ++++---
  1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
index c3616a86d..b5101626e 100644
--- a/src/libxl/libxl_driver.c
+++ b/src/libxl/libxl_driver.c
@@ -5895,9 +5895,10 @@ libxlDomainMigrateBegin3Params(virDomainPtr domain,
          return NULL;
      if (STREQ_NULLABLE(vm->def->name, "Domain-0")) {
-            virReportError(VIR_ERR_OPERATION_INVALID, "%s",
-                           _("Domain-0 cannot be migrated"));
-            return NULL;
+        virReportError(VIR_ERR_OPERATION_INVALID, "%s",
+                       _("Domain-0 cannot be migrated"));
+        virObjectUnlock(vm);
+        return NULL;
      }
      if (virDomainMigrateBegin3ParamsEnsureACL(domain->conn, vm->def) < 0) {


Reviewed-by: Jim Fehlig <jfehlig@xxxxxxxx>

No longer needed since this fix was folded into commit 64370c4b.

Regards,
Jim

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux