diff options
author | Michal Hocko <[email protected]> | 2018-04-10 16:29:52 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2018-04-11 10:28:32 -0700 |
commit | 4eaf431f6f71bbed40a4c733ffe93a7e8cedf9d9 (patch) | |
tree | b4121b55c22e052d0847796ad22574eaedf281d6 /tools/perf/scripts/python/sched-migration.py | |
parent | a06ad633a37c64a0cd4c229fc605cee8725d376e (diff) |
memcg: fix per_node_info cleanup
syzbot has triggered a NULL ptr dereference when allocation fault
injection enforces a failure and alloc_mem_cgroup_per_node_info
initializes memcg->nodeinfo only half way through.
But __mem_cgroup_free still tries to free all per-node data and
dereferences pn->lruvec_stat_cpu unconditioanlly even if the specific
per-node data hasn't been initialized.
The bug is quite unlikely to hit because small allocations do not fail
and we would need quite some numa nodes to make struct
mem_cgroup_per_node large enough to cross the costly order.
Link: http://lkml.kernel.org/r/[email protected]
Reported-by: [email protected]
Fixes: 00f3ca2c2d66 ("mm: memcontrol: per-lruvec stats infrastructure")
Signed-off-by: Michal Hocko <[email protected]>
Reviewed-by: Andrey Ryabinin <[email protected]>
Cc: Johannes Weiner <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/sched-migration.py')
0 files changed, 0 insertions, 0 deletions