[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [libvirt] PATCH: Fix mem corruption after detaching Xen device
- From: Daniel Veillard <veillard redhat com>
- To: "Daniel P. Berrange" <berrange redhat com>
- Cc: libvir-list redhat com
- Subject: Re: [libvirt] PATCH: Fix mem corruption after detaching Xen device
- Date: Thu, 23 Apr 2009 17:09:43 +0200
On Thu, Apr 23, 2009 at 02:48:49PM +0100, Daniel P. Berrange wrote:
> The XM driver's implementation of the 'detach device' command is causing
> memory corruption, but passing the wrong size information to memmove()
> by passing number of elements to move, instead of amount of memory to
> move. This patch fixes it
ACK, serious bug, let's push it before 0.6.3
In general I would have felt safer if we could have used macros like for
memory allocation and freeing when growing and shrinking arrays,
especially when we switched from lists to arrays we added an awful lot
of similar code and using the size of the pointed object in macros
could have avoided this kind of problems I guess. If it can be used
to get malloc'ed size it should be able to work for realloc too I guess.
Maybe something to look at for next release, time permitting.
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
daniel veillard com | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library http://libvirt.org/
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]