arch/tile: don't leak kernel memory when we unload modules
authorChris Metcalf <cmetcalf@tilera.com>
Thu, 29 Mar 2012 19:44:10 +0000 (15:44 -0400)
committerChris Metcalf <cmetcalf@tilera.com>
Mon, 2 Apr 2012 16:13:19 +0000 (12:13 -0400)
We were failing to track the memory when we allocated it.

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
arch/tile/kernel/module.c

index b90ab99..98d4769 100644 (file)
@@ -67,6 +67,8 @@ void *module_alloc(unsigned long size)
        area = __get_vm_area(size, VM_ALLOC, MEM_MODULE_START, MEM_MODULE_END);
        if (!area)
                goto error;
+       area->nr_pages = npages;
+       area->pages = pages;
 
        if (map_vm_area(area, prot_rwx, &pages)) {
                vunmap(area->addr);