Re: [Xen-devel] [PATCH 4/4] libxl: More probably detect reentry of destroyed ctx

2015-02-09 Thread Ian Jackson
Wei Liu writes ("Re: [PATCH 4/4] libxl: More probably detect reentry of destroyed ctx"): > On Mon, Feb 09, 2015 at 03:51:12PM +, Ian Jackson wrote: > > In libxl_ctx_free: > > > > 1. Move the GC_INIT earlier, so that we can: > > Acked-by: Wei Liu Thanks. > > +assert(!ctx->osevent_in_ho

Re: [Xen-devel] [PATCH 4/4] libxl: More probably detect reentry of destroyed ctx

2015-02-09 Thread Wei Liu
On Mon, Feb 09, 2015 at 03:51:12PM +, Ian Jackson wrote: > In libxl_ctx_free: > > 1. Move the GC_INIT earlier, so that we can: > > 2. Take the lock around most of the work. This is technically >unnecessary since calling any other libxl entrypoint on a ctx being >passed to libxl_ctx_f

[Xen-devel] [PATCH 4/4] libxl: More probably detect reentry of destroyed ctx

2015-02-09 Thread Ian Jackson
In libxl_ctx_free: 1. Move the GC_INIT earlier, so that we can: 2. Take the lock around most of the work. This is technically unnecessary since calling any other libxl entrypoint on a ctx being passed to libxl_ctx_free risks undefined behaviour. But, taking the lock allows us to much m