mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
Fix misc thread locking bugs / bogus warnings
Fix all thread locking bugs reported by object-locking test case. NB, some of the driver locking is getting too coarse. Driver mutexes really need to be turned into RW locks instead to significantly increase concurrency. * src/lxc_driver.c: Fix useof driver when unlocked in the methods lxcDomainGetInfo, lxcSetSchedulerParameters, and lxcGetSchedulerParameters * src/opennebula/one_driver.c: Fix missing unlock in oneDomainUndefine. Fix use of driver when unlocked in oneDomainGetInfo, oneGetOSType, oneDomainShutdown * src/qemu_driver.c: Fix use of driver when unlocked in qemudDomainSavem, qemuGetSchedulerType, qemuSetSchedulerParameters and qemuGetSchedulerParameters * src/storage_driver.c: Re-work storagePoolCreate to avoid bogus lock checking warning. Re-work storageVolumeCreateXMLFrom to remove a potential NULL de-reference & avoid bogus lock check warnings * src/test.c: Remove testDomainAssignDef since it break lock chekc warnings. * tests/object-locking.ml: Add oneDriverLock, oneDriverUnlock and one_driver_t methods/types to allow lock checking on the OpenNebula drivers
This commit is contained in:
@@ -128,7 +128,8 @@ let driverLockMethods = [
|
||||
"umlDriverLock";
|
||||
"nodedevDriverLock";
|
||||
"networkDriverLock";
|
||||
"storageDriverLock"
|
||||
"storageDriverLock";
|
||||
"oneDriverLock"
|
||||
]
|
||||
|
||||
(*
|
||||
@@ -142,7 +143,8 @@ let driverUnlockMethods = [
|
||||
"umlDriverUnlock";
|
||||
"nodedevDriverUnlock";
|
||||
"networkDriverUnlock";
|
||||
"storageDriverUnlock"
|
||||
"storageDriverUnlock";
|
||||
"oneDriverUnlock"
|
||||
]
|
||||
|
||||
(*
|
||||
@@ -159,6 +161,7 @@ let lockableDrivers = [
|
||||
"virStorageDriverStatePtr";
|
||||
"network_driver";
|
||||
"virDeviceMonitorState";
|
||||
"one_driver_t";
|
||||
]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user