Skip to content

Commit

Permalink
arch/tile: don't leak kernel memory when we unload modules
Browse files Browse the repository at this point in the history
We were failing to track the memory when we allocated it.

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
  • Loading branch information
Chris Metcalf committed Apr 2, 2012
1 parent 444eef1 commit 5f22070
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/tile/kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 5f22070

Please sign in to comment.