[PATCH] hostdev: add virObject field to virHostdevManager struct

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

 



Commit 6b306d66 converted virHostdevManager to a virObject, but
missed adding a virObject field to the virHostdevManager struct.
Result is memory corruption when taking a reference on an instance
of the object, where atomic inc is done on the stateDir field.
Later use of stateDir crashes libvirtd.

Signed-off-by: Jim Fehlig <jfehlig@xxxxxxxx>
---
 src/util/virhostdev.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/util/virhostdev.h b/src/util/virhostdev.h
index ade7e2f..a56a2b5 100644
--- a/src/util/virhostdev.h
+++ b/src/util/virhostdev.h
@@ -45,6 +45,8 @@ typedef enum {
 typedef struct _virHostdevManager virHostdevManager;
 typedef virHostdevManager *virHostdevManagerPtr;
 struct _virHostdevManager {
+    virObject parent;
+
     char *stateDir;
 
     virPCIDeviceListPtr activePCIHostdevs;
-- 
1.8.1.4

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