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

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



On Thu, Sep 06, 2007 at 02:37:50PM -0400, Hugh Brock wrote:
> 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...

  Okay, done, thanks !

Daniel

-- 
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/


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