]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm: page_isolation: check pfn validity before access
authorWeijie Yang <weijie.yang@samsung.com>
Tue, 7 Apr 2015 23:44:39 +0000 (09:44 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 7 Apr 2015 23:44:39 +0000 (09:44 +1000)
commit76bd51df29c44e2d405633d489bcd73a9081a29f
treedfdfdc32d0c3f4c1a77cd5f26b24ea39d0a807ec
parentd3cb3772eb533c992a74673852d398724bb444fd
mm: page_isolation: check pfn validity before access

In the undo path of start_isolate_page_range(), we need to check the pfn
validity before accessing its page, or it will trigger an addressing
exception if there is hole in the zone.

This issue is found by code-review not a test-trigger.  In
"CONFIG_HOLES_IN_ZONE" environment, there is a certain chance that it
would casue an addressing exception when start_isolate_page_range()
fails, this could affect CMA, hugepage and memory-hotplug function.

Signed-off-by: Weijie Yang <weijie.yang@samsung.com>
Acked-by: Michal Nazarewicz <mina86@mina86.com>
Reviewed-by: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/page_isolation.c