]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm/migrate: check-before-clear PageSwapCache
authorNaoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Tue, 7 Apr 2015 23:44:23 +0000 (09:44 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 7 Apr 2015 23:44:23 +0000 (09:44 +1000)
commit7e22edace8335fce731b9750a833fd10ac35542f
treedd9131388af342c35297d3ce2e8e871ad88da993
parentddcaef29181d815f5ce5dcb523cf3bf63e105d08
mm/migrate: check-before-clear PageSwapCache

With the page flag sanitization patchset, an invalid usage of
ClearPageSwapCache() is detected in migration_page_copy().
migrate_page_copy() is shared by both normal and hugepage (both thp and
hugetlb) code path, so let's check PageSwapCache() and clear it if it's
set to avoid misuse of the invalid clear operation.

Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/migrate.c