Commit 5f220704 authored by Chris Metcalf's avatar Chris Metcalf

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: default avatarChris Metcalf <cmetcalf@tilera.com>
parent 444eef1b
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment