Skip to content

Commit

Permalink
xen-netback: double free on unload
Browse files Browse the repository at this point in the history
There is a typo here, "i" vs "j", so we would crash on module_exit().

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Dan Carpenter authored and David S. Miller committed Jun 24, 2013
1 parent 5243b6a commit 07cc61b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/xen-netback/netback.c
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
}
}

Expand Down

0 comments on commit 07cc61b

Please sign in to comment.