xen-netback: double free on unload
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 21 Jun 2013 06:20:08 +0000 (09:20 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 24 Jun 2013 07:24:57 +0000 (00:24 -0700)
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>
drivers/net/xen-netback/netback.c

index a0b50ad2ef319e26dae5bcb1baf259345b1b4645..130bcb217d2cc590c040dd2f5a6590ae2e76d0c0 100644 (file)
@@ -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]);
                }
        }