diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2017-04-06 19:35:03 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2017-04-06 19:35:03 -0400 |
commit | fccfb9950836524d79260448fba6131f6b1d73c3 (patch) | |
tree | a6fef32e330852138d9e7bd12d7b3dd97c4360c3 /mm | |
parent | d597580d373774b1bdab84b3d26ff0b55162b916 (diff) | |
parent | b4fb8f66f1ae2e167d06c12d018025a8d4d3ba7e (diff) | |
download | linux-fccfb9950836524d79260448fba6131f6b1d73c3.tar.gz linux-fccfb9950836524d79260448fba6131f6b1d73c3.tar.xz |
Merge commit 'b4fb8f66f1ae2e167d06c12d018025a8d4d3ba7e' into uaccess.ia64
backmerge of mainline ia64 fix
Diffstat (limited to 'mm')
-rw-r--r-- | mm/page_alloc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index eaa64d2ffdc5..6cbde310abed 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -873,7 +873,8 @@ done_merging: higher_page = page + (combined_pfn - pfn); buddy_pfn = __find_buddy_pfn(combined_pfn, order + 1); higher_buddy = higher_page + (buddy_pfn - combined_pfn); - if (page_is_buddy(higher_page, higher_buddy, order + 1)) { + if (pfn_valid_within(buddy_pfn) && + page_is_buddy(higher_page, higher_buddy, order + 1)) { list_add_tail(&page->lru, &zone->free_area[order].free_list[migratetype]); goto out; |