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

Re: [Xen-devel] [patch] xen-netback: double free on unload



On Fri, Jun 21, 2013 at 09:20:08AM +0300, Dan Carpenter wrote:
> There is a typo here, "i" vs "j", so we would crash on module_exit().
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> 
> diff --git a/drivers/net/xen-netback/netback.c 
> b/drivers/net/xen-netback/netback.c
> index a0b50ad..130bcb2 100644
> --- a/drivers/net/xen-netback/netback.c
> +++ b/drivers/net/xen-netback/netback.c
> @@ -1968,8 +1968,8 @@ static void __exit netback_fini(void)
>               del_timer_sync(&netbk->net_timer);
>               kthread_stop(netbk->task);
>               for (j = 0; j < MAX_PENDING_REQS; j++) {
> -                     if (netbk->mmap_pages[i])
> -                             __free_page(netbk->mmap_pages[i]);
> +                     if (netbk->mmap_pages[j])
> +                             __free_page(netbk->mmap_pages[j]);

Nice catch, thanks.


Wei.

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