]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
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>
Fri, 30 Mar 2012 22:56:21 +0000 (18:56 -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 bb2dc1ec5e38d08d22300ae5a2bea61b0b69194c..001cbfa10ac6364a9136b9d4440bfe69730a08be 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);