diff options
| author | Wei Yang <[email protected]> | 2019-09-23 15:35:52 -0700 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2019-09-24 15:54:09 -0700 |
| commit | 33fce0113da2f8a5c1bbce0c46a8b131500f1677 (patch) | |
| tree | dff6b88fa98c4478dc2480f64c1764838d9ada14 /include/linux | |
| parent | b6c88d3b9d38f9448e0fcf44847a075ea81d5ca2 (diff) | |
mm/memory_hotplug.c: prevent memory leak when reusing pgdat
When offlining a node in try_offline_node(), pgdat is not released. So
that pgdat could be reused in hotadd_new_pgdat(). While we reallocate
pgdat->per_cpu_nodestats if this pgdat is reused.
This patch prevents the memory leak by just allocating per_cpu_nodestats
when it is a new pgdat.
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Wei Yang <[email protected]>
Acked-by: Michal Hocko <[email protected]>
Cc: Oscar Salvador <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions