diff options
author | Ard Biesheuvel <[email protected]> | 2017-01-10 16:58:00 -0800 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2017-01-10 18:31:55 -0800 |
commit | f073bdc51771f5a5c7a8d1191bfc3ae371d44de7 (patch) | |
tree | 028dad6c091084d148f4b6ea4634ba31235b55bc /tools/perf/scripts/python/call-graph-from-sql.py | |
parent | 9ebf73b275f06b114586af27cda3fd72e149d5ba (diff) |
mm: don't dereference struct page fields of invalid pages
The VM_BUG_ON() check in move_freepages() checks whether the node id of
a page matches the node id of its zone. However, it does this before
having checked whether the struct page pointer refers to a valid struct
page to begin with. This is guaranteed in most cases, but may not be
the case if CONFIG_HOLES_IN_ZONE=y.
So reorder the VM_BUG_ON() with the pfn_valid_within() check.
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ard Biesheuvel <[email protected]>
Acked-by: Will Deacon <[email protected]>
Cc: Catalin Marinas <[email protected]>
Cc: Hanjun Guo <[email protected]>
Cc: Yisheng Xie <[email protected]>
Cc: Robert Richter <[email protected]>
Cc: James Morse <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/call-graph-from-sql.py')
0 files changed, 0 insertions, 0 deletions