- 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
This commit is contained in:
James Fehlig 2013-07-22 23:19:39 +00:00 committed by Git OBS Bridge
parent eda6aa8e7f
commit 0572a9487c
3 changed files with 61 additions and 0 deletions

View File

@ -0,0 +1,52 @@
commit fe89fd3b4071242ce9bbae6e1178fee30dc2f4f9
Author: Ján Tomko <jtomko@redhat.com>
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]);

View File

@ -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

View File

@ -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