From: Chris Metcalf Date: Thu, 29 Mar 2012 19:44:10 +0000 (-0400) Subject: arch/tile: don't leak kernel memory when we unload modules X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=5f220704127ae70db519fabbda4ece649eadac7f;p=mv-sheeva.git 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 --- 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);