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

Re: [Xen-devel] [PATCH] dmar: Fix double free in error paths following c/s a8bc99b



> From: Andrew Cooper [mailto:andrew.cooper3@xxxxxxxxxx]
> Sent: Thursday, July 16, 2015 7:57 PM
> 
> Several error paths would end up freeing scope->devices twice.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> CC: Jan Beulich <JBeulich@xxxxxxxx>
> CC: Elena Ufimtseva <elena.ufimtseva@xxxxxxxxxx>
> CC: Yang Zhang <yang.z.zhang@xxxxxxxxx>
> CC: Kevin Tian <kevin.tian@xxxxxxxxx>

Acked-by: Kevin Tian <kevin.tian@xxxxxxxxx>

> ---
>  xen/drivers/passthrough/vtd/dmar.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/xen/drivers/passthrough/vtd/dmar.c 
> b/xen/drivers/passthrough/vtd/dmar.c
> index 8ed1e24..2672688 100644
> --- a/xen/drivers/passthrough/vtd/dmar.c
> +++ b/xen/drivers/passthrough/vtd/dmar.c
> @@ -88,6 +88,7 @@ static void scope_devices_free(struct dmar_scope *scope)
> 
>      scope->devices_cnt = 0;
>      xfree(scope->devices);
> +    scope->devices = NULL;
>  }
> 
>  static void __init disable_all_dmar_units(void)
> --
> 1.7.10.4


_______________________________________________
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®.