On Thu, May 11, 2017 at 09:24:40AM +0100, Roger Pau Monne wrote:
> On Wed, May 10, 2017 at 05:29:12PM +0100, Wei Liu wrote:
> > On Wed, May 10, 2017 at 11:12:39AM +0100, Roger Pau Monne wrote:
> > > Current code in backend_watch_callback forgets to remove a 
> > > libxl__ddomain_guest
> > > from the list of tracked domains when the related data is freed, causing
> > > dereferences later on when the list is traversed. Make sure that a domain 
> > > is
> > > always removed from the list when freed.
> > 
> > There is another bug: dguest was freed by a spurious event. That is also
> > fixed by this patch.
> > 
> > I would suggest changing the tite to "correctly manipulate the dguest
> > list" and also extend the commit message to include that other bug.
> 
> What about the following commit message:
> 
> libxl/devd: correctly manipulate the dguest list
> 
> Current code in backend_watch_callback has two issues when manipulating the
> dgest list:
> 
> 1. backend_watch_callback forgets to remove a libxl__ddomain_guest from the
> list of tracked domains when the related data is freed, causing dereferences
> later on when the list is traversed. Make sure that a domain is always removed
> from the list when freed.
> 
> 2. A spurious device state change can cause a dguest to be freed, with active
> devices and without being removed from the list. Fix this by always checking 
> if
> a dguest has active devices before freeing and removing it.
> 
> Let me know if you want me to resend the patch or if you will fix the message
> while committing.
> 

Resending and CC Julien would be best.

> > Code-wise:
> > 
> > Reviewed-by: Wei Liu <wei.l...@citrix.com>
> 
> Thanks.


Wei.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

Reply via email to