summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Metcalf <cmetcalf@tilera.com>2012-03-29 15:44:10 -0400
committerChris Metcalf <cmetcalf@tilera.com>2012-04-02 12:13:19 -0400
commit5f220704127ae70db519fabbda4ece649eadac7f (patch)
treefd66d8c827cee7d197089b3a953b7cfe99cedade
parent444eef1ba40546690a77b2af4cba7d4561e7bba5 (diff)
arch/tile: don't leak kernel memory when we unload modules
We were failing to track the memory when we allocated it. Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
-rw-r--r--arch/tile/kernel/module.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/tile/kernel/module.c b/arch/tile/kernel/module.c
index b90ab992567..98d47692010 100644
--- a/arch/tile/kernel/module.c
+++ b/arch/tile/kernel/module.c
@@ -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);