summaryrefslogtreecommitdiffstats
path: root/arch/tile/kernel
diff options
context:
space:
mode:
authorChris Metcalf <cmetcalf@tilera.com>2012-03-29 21:44:10 +0200
committerChris Metcalf <cmetcalf@tilera.com>2012-04-02 18:13:19 +0200
commit5f220704127ae70db519fabbda4ece649eadac7f (patch)
treefd66d8c827cee7d197089b3a953b7cfe99cedade /arch/tile/kernel
parentarch/tile: fix bug in delay_backoff() (diff)
downloadlinux-5f220704127ae70db519fabbda4ece649eadac7f.tar.xz
linux-5f220704127ae70db519fabbda4ece649eadac7f.zip
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>
Diffstat (limited to 'arch/tile/kernel')
-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 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)
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);