summaryrefslogtreecommitdiffstats
path: root/mm/page_isolation.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-05-15 11:17:41 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2015-05-15 11:17:41 -0700
commit0336104dcba613586cd22279db445840d4ebcdeb (patch)
tree94df76934cc043810211f9de59d9d62ac20ec491 /mm/page_isolation.c
parentf0897f4cc0fcdd2410ba0ff0bc1bc64e6e72672a (diff)
parentb0dc2b9bb4ab782115b964310518ee0b17784277 (diff)
downloadlinux-0336104dcba613586cd22279db445840d4ebcdeb.tar.bz2
Merge branch 'akpm' (patches from Andrew)
Merge misc fixes from Andrew Morton: "8 fixes" * emailed patches from Andrew Morton <akpm@linux-foundation.org>: mm, numa: really disable NUMA balancing by default on single node machines MAINTAINERS: update Jingoo Han's email address CMA: page_isolation: check buddy before accessing it uidgid: make uid_valid and gid_valid work with !CONFIG_MULTIUSER kernfs: do not account ino_ida allocations to memcg gfp: add __GFP_NOACCOUNT tools/vm: fix page-flags build drivers/rtc/rtc-armada38x.c: remove unused local `flags'
Diffstat (limited to 'mm/page_isolation.c')
-rw-r--r--mm/page_isolation.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/page_isolation.c b/mm/page_isolation.c
index 755a42c76eb4..303c908790ef 100644
--- a/mm/page_isolation.c
+++ b/mm/page_isolation.c
@@ -101,7 +101,8 @@ void unset_migratetype_isolate(struct page *page, unsigned migratetype)
buddy_idx = __find_buddy_index(page_idx, order);
buddy = page + (buddy_idx - page_idx);
- if (!is_migrate_isolate_page(buddy)) {
+ if (pfn_valid_within(page_to_pfn(buddy)) &&
+ !is_migrate_isolate_page(buddy)) {
__isolate_free_page(page, order);
kernel_map_pages(page, (1 << order), 1);
set_page_refcounted(page);