diff options
author | Qian Cai <[email protected]> | 2020-01-30 22:15:01 -0800 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2020-01-31 10:30:39 -0800 |
commit | 3d680bdf60a5bade3e8cbd049927e7f8b1d3fe97 (patch) | |
tree | b755d6cf6f1fd2c19dd7eb28f5ab4f2beab5607b /lib/test_overflow.c | |
parent | 4a55c0474a92d5c418bcbbe122368de0910aeac2 (diff) |
mm/page_isolation: fix potential warning from user
It makes sense to call the WARN_ON_ONCE(zone_idx(zone) == ZONE_MOVABLE)
from start_isolate_page_range(), but should avoid triggering it from
userspace, i.e, from is_mem_section_removable() because it could crash
the system by a non-root user if warn_on_panic is set.
While at it, simplify the code a bit by removing an unnecessary jump
label.
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Qian Cai <[email protected]>
Suggested-by: Michal Hocko <[email protected]>
Acked-by: Michal Hocko <[email protected]>
Reviewed-by: David Hildenbrand <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'lib/test_overflow.c')
0 files changed, 0 insertions, 0 deletions