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

Re: [Xen-devel] [PATCH 2/3] libxl: Do not use-after-free on ao progress reporting



On Wed, 2012-05-16 at 16:25 +0100, Ian Jackson wrote:
> We need to call libxl__free_all after egc_run_callbacks since some of
> the callbacks might be ao progress reports allocated from the egc's
> gc.
> 
> Fixes a segfault in egc_run_callbacks.
> 
> Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>

Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>

> ---
>  tools/libxl/libxl_event.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/libxl/libxl_event.c b/tools/libxl/libxl_event.c
> index 7e71a88..d3bb4da 100644
> --- a/tools/libxl/libxl_event.c
> +++ b/tools/libxl/libxl_event.c
> @@ -1039,9 +1039,9 @@ static void egc_run_callbacks(libxl__egc *egc)
>  void libxl__egc_cleanup(libxl__egc *egc)
>  {
>      EGC_GC;
> -    libxl__free_all(gc);
> -
>      egc_run_callbacks(egc);
> +
> +    libxl__free_all(gc);
>  }
>  
>  /*



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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.