Explorar o código

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>
Chris Metcalf %!s(int64=13) %!d(string=hai) anos
pai
achega
5f22070412
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      arch/tile/kernel/module.c

+ 2 - 0
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);