From 0572a9487c54a1e05883a1af0ee0193e189155d09b14ad096dc52f811ac383c0 Mon Sep 17 00:00:00 2001 From: James Fehlig Date: Mon, 22 Jul 2013 23:19:39 +0000 Subject: [PATCH] - Unlock the storage volume object after looking it up fe89fd3b-storage-pool-deadlock.patch rhb#980676 OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=287 --- fe89fd3b-storage-pool-deadlock.patch | 52 ++++++++++++++++++++++++++++ libvirt.changes | 7 ++++ libvirt.spec | 2 ++ 3 files changed, 61 insertions(+) create mode 100644 fe89fd3b-storage-pool-deadlock.patch diff --git a/fe89fd3b-storage-pool-deadlock.patch b/fe89fd3b-storage-pool-deadlock.patch new file mode 100644 index 0000000..dc794df --- /dev/null +++ b/fe89fd3b-storage-pool-deadlock.patch @@ -0,0 +1,52 @@ +commit fe89fd3b4071242ce9bbae6e1178fee30dc2f4f9 +Author: Ján Tomko +Date: Thu Jul 4 14:41:46 2013 +0200 + + Unlock the storage volume object after looking it up + + Introduced by c930410. + + https://bugzilla.redhat.com/show_bug.cgi?id=980676 + +Index: libvirt-1.1.0/src/storage/storage_driver.c +=================================================================== +--- libvirt-1.1.0.orig/src/storage/storage_driver.c ++++ libvirt-1.1.0/src/storage/storage_driver.c +@@ -1361,15 +1361,16 @@ storageVolLookupByKey(virConnectPtr conn + virStorageVolDefFindByKey(driver->pools.objs[i], key); + + if (vol) { +- if (virStorageVolLookupByKeyEnsureACL(conn, driver->pools.objs[i]->def, vol) < 0) ++ if (virStorageVolLookupByKeyEnsureACL(conn, driver->pools.objs[i]->def, vol) < 0) { ++ virStoragePoolObjUnlock(driver->pools.objs[i]); + goto cleanup; ++ } + + ret = virGetStorageVol(conn, + driver->pools.objs[i]->def->name, + vol->name, + vol->key, + NULL, NULL); +- goto cleanup; + } + } + virStoragePoolObjUnlock(driver->pools.objs[i]); +@@ -1421,15 +1422,16 @@ storageVolLookupByPath(virConnectPtr con + VIR_FREE(stable_path); + + if (vol) { +- if (virStorageVolLookupByPathEnsureACL(conn, driver->pools.objs[i]->def, vol) < 0) ++ if (virStorageVolLookupByPathEnsureACL(conn, driver->pools.objs[i]->def, vol) < 0) { ++ virStoragePoolObjUnlock(driver->pools.objs[i]); + goto cleanup; ++ } + + ret = virGetStorageVol(conn, + driver->pools.objs[i]->def->name, + vol->name, + vol->key, + NULL, NULL); +- goto cleanup; + } + } + virStoragePoolObjUnlock(driver->pools.objs[i]); diff --git a/libvirt.changes b/libvirt.changes index e7aa5fd..74d507d 100644 --- a/libvirt.changes +++ b/libvirt.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Jul 22 17:17:42 MDT 2013 - jfehlig@suse.com + +- Unlock the storage volume object after looking it up + fe89fd3b-storage-pool-deadlock.patch + rhb#980676 + ------------------------------------------------------------------- Mon Jul 22 10:39:01 MDT 2013 - jfehlig@suse.com diff --git a/libvirt.spec b/libvirt.spec index 065ae95..3119a79 100644 --- a/libvirt.spec +++ b/libvirt.spec @@ -408,6 +408,7 @@ Patch0: f38c8185-CVE-2013-2230.patch Patch1: fd2e3c4c-xen-sysctl-domctl.patch Patch2: dfc69235-CVE-2013-4153.patch Patch3: 96518d43-CVE-2013-4154.patch +Patch4: fe89fd3b-storage-pool-deadlock.patch # Need to go upstream Patch100: xen-name-for-devid.patch Patch101: clone.patch @@ -911,6 +912,7 @@ of recent versions of Linux (and other OSes). %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 %patch100 -p1 %patch101 %patch102 -p1