xen-netback: double free on unload
Subsystems (4)
PATCH 1/1 xen-netback: double free on unload
There is a typo here, "i" vs "j", so we would crash on module_exit().
drivers/net/xen-netback/netback.c +2 -2
@@ -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]); } }
Quoted 9 lines · Dan Carpenter
There is a typo here, "i" vs "j", so we would crash on
module_exit().Signed-off-by Dan Carpenter <[email protected]>drivers/net/xen-netback/netback.c +0
-0
drivers/net/xen-netback/netback.c static void __exit netback_fini(void) · line 1972
Quoted 7 lines
drivers/net/xen-netback/netback.c +2
-2@@ -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.
David Miller
maintainerFrom: Dan Carpenter <[email protected]>
Date: Fri, 21 Jun 2013 09:20:08 +0300
Quoted 3 lines
There is a typo here, "i" vs "j", so we would crash on
module_exit().Signed-off-by Dan Carpenter <[email protected]>
Please always explicitly state the tree for which a patch is applicable.
Here I figured it out by trial an error, trying to apply it to 'net' (where it failed) and then 'net-next' (where it applied cleanly).
I should never have to play patch monkey games like that, you need to tell me where a patch is targetted.
Thanks.
Quoted 10 lines · David Miller
From: Dan Carpenter <[email protected]>
Date: Fri, 21 Jun 2013 09:20:08 +0300Quoted 3 lines
There is a typo here, "i" vs "j", so we would crash on
module_exit().Signed-off-by Dan Carpenter <[email protected]>Please always explicitly state the tree for which a patch is applicable.
Quoted 6 lines
Here I figured it out by trial an error, trying to apply it to 'net' (where it failed) and then 'net-next' (where it applied cleanly).
I should never have to play patch monkey games like that, you need to tell me where a patch is targetted.
Shouldn't one always, by default, work on linux-next?
julia
David Miller
maintainerFrom: Julia Lawall <[email protected]>
Date: Mon, 24 Jun 2013 08:31:31 +0100 (BST)
Quoted 12 lines · David Miller
Quoted 11 lines
From: Dan Carpenter <[email protected]>
Date: Fri, 21 Jun 2013 09:20:08 +0300Quoted 3 lines
There is a typo here, "i" vs "j", so we would crash on
module_exit().Signed-off-by Dan Carpenter <[email protected]>Please always explicitly state the tree for which a patch is applicable.
Quoted 8 lines
Quoted 6 lines
Here I figured it out by trial an error, trying to apply it to 'net' (where it failed) and then 'net-next' (where it applied cleanly).
I should never have to play patch monkey games like that, you need to tell me where a patch is targetted.
Shouldn't one always, by default, work on linux-next?
Bug fixes, especially serious ones, should be targetted at 'net'.
I'm sorry. For some reason I got confused and thought this bug was older. I'll update my QC scripts to test for this.
regards,
dan carpenter