diff options
author | Chris Metcalf <cmetcalf@tilera.com> | 2012-03-29 15:44:10 -0400 |
---|---|---|
committer | Chris Metcalf <cmetcalf@tilera.com> | 2012-04-02 12:13:19 -0400 |
commit | 5f220704127ae70db519fabbda4ece649eadac7f (patch) | |
tree | fd66d8c827cee7d197089b3a953b7cfe99cedade | |
parent | 444eef1ba40546690a77b2af4cba7d4561e7bba5 (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.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/tile/kernel/module.c b/arch/tile/kernel/module.c index b90ab9925674..98d476920106 100644 --- a/arch/tile/kernel/module.c +++ b/arch/tile/kernel/module.c | |||
@@ -67,6 +67,8 @@ void *module_alloc(unsigned long size) | |||
67 | area = __get_vm_area(size, VM_ALLOC, MEM_MODULE_START, MEM_MODULE_END); | 67 | area = __get_vm_area(size, VM_ALLOC, MEM_MODULE_START, MEM_MODULE_END); |
68 | if (!area) | 68 | if (!area) |
69 | goto error; | 69 | goto error; |
70 | area->nr_pages = npages; | ||
71 | area->pages = pages; | ||
70 | 72 | ||
71 | if (map_vm_area(area, prot_rwx, &pages)) { | 73 | if (map_vm_area(area, prot_rwx, &pages)) { |
72 | vunmap(area->addr); | 74 | vunmap(area->addr); |