Re: [PATCH] Allow modifying existing block device, making virDomainAttachDevice modify the device if it already exists

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

 



Daniel P. Berrange wrote:
On Thu, Sep 06, 2007 at 11:59:08AM -0400, Daniel Veillard wrote:
On Thu, Sep 06, 2007 at 11:45:39AM -0400, Hugh Brock wrote:
The attached patch adds code to xend_internal.c:xenDomainAttachDevice that checks to see if the device mentioned in the passed-in XML already exists, and if so calls op_device_configure to modify the device. It is particularly useful for connecting and disconnecting a hardware cdrom device to an FV guest.

  virDomainXMLDevID looks frightening to me since we write to an array of
undisclosed size, but that is independant from the patch which looks fine to
me.

Yep, this patch is fine, but we absolutely have to fix virDomainXMLDevID
as the value it writes into the pre-allocated 'ref' parameter is taken from
an XML attribute which can be an arbitrary size & can thus potentially overflow the '80' char buffer passed from xenDaemonDetachDevice or this
new call for changing CD media.

Dan.

Very good -- if someone would apply this one please, I will have a look at making the XMLDevID code a bit saner...

--Hugh

--
Red Hat Virtualization Group http://redhat.com/virtualization
Hugh Brock           | virt-manager http://virt-manager.org
hbrock@xxxxxxxxxx    | virtualization library http://libvirt.org

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