Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mm/memory_hotplug.c: fix overflow in test_pages_in_a_zone()
When mainline introduced commit a96dfdd ("base/memory, hotplug: fix a kernel oops in show_valid_zones()"), it obtained the valid start and end pfn from the given pfn range. The valid start pfn can fix the actual issue, but it introduced another issue. The valid end pfn will may exceed the given end_pfn. Although the incorrect overflow will not result in actual problem at present, but I think it need to be fixed. [[email protected]: remove assumption that end_pfn is aligned by MAX_ORDER_NR_PAGES] Fixes: a96dfdd ("base/memory, hotplug: fix a kernel oops in show_valid_zones()") Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: zhong jiang <[email protected]> Signed-off-by: Toshi Kani <[email protected]> Cc: Vlastimil Babka <[email protected]> Cc: Mel Gorman <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
- Loading branch information