提交 5f220704 编写于 作者: C 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: NChris Metcalf <cmetcalf@tilera.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册