mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 04:18:39 +08:00
mm/hotplug: only free wait_table if it's allocated by vmalloc
zone->wait_table may be allocated from bootmem, it can not be freed. Signed-off-by: Jianguo Wu <wujianguo@huawei.com> Reviewed-by: Tang Chen <tangchen@cn.fujitsu.com> Cc: Tang Chen <tangchen@cn.fujitsu.com> Cc: Jiang Liu <jiang.liu@huawei.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
96e7d7a1e0
commit
ca4b3f302c
@ -1779,7 +1779,11 @@ void try_offline_node(int nid)
|
||||
for (i = 0; i < MAX_NR_ZONES; i++) {
|
||||
struct zone *zone = pgdat->node_zones + i;
|
||||
|
||||
if (zone->wait_table)
|
||||
/*
|
||||
* wait_table may be allocated from boot memory,
|
||||
* here only free if it's allocated by vmalloc.
|
||||
*/
|
||||
if (is_vmalloc_addr(zone->wait_table))
|
||||
vfree(zone->wait_table);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user