* [merged] memblock-fix-memblock_next_valid_pfn.patch removed from -mm tree
@ 2017-03-10 21:43 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2017-03-10 21:43 UTC (permalink / raw)
To: takahiro.akashi, paul.burton, mm-commits
The patch titled
Subject: mm/memblock.c: fix memblock_next_valid_pfn()
has been removed from the -mm tree. Its filename was
memblock-fix-memblock_next_valid_pfn.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: AKASHI Takahiro <takahiro.akashi@linaro.org>
Subject: mm/memblock.c: fix memblock_next_valid_pfn()
Obviously, we should not access memblock.memory.regions[right] if 'right'
is outside of [0..memblock.memory.cnt>.
Fixes: b92df1de5d28 ("mm: page_alloc: skip over regions of invalid pfns where possible")
Link: http://lkml.kernel.org/r/20170303023745.9104-1-takahiro.akashi@linaro.org
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Cc: Paul Burton <paul.burton@imgtec.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/memblock.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff -puN mm/memblock.c~memblock-fix-memblock_next_valid_pfn mm/memblock.c
--- a/mm/memblock.c~memblock-fix-memblock_next_valid_pfn
+++ a/mm/memblock.c
@@ -1118,7 +1118,10 @@ unsigned long __init_memblock memblock_n
}
} while (left < right);
- return min(PHYS_PFN(type->regions[right].base), max_pfn);
+ if (right == type->cnt)
+ return max_pfn;
+ else
+ return min(PHYS_PFN(type->regions[right].base), max_pfn);
}
/**
_
Patches currently in -mm which might be from takahiro.akashi@linaro.org are
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-03-10 21:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-10 21:43 [merged] memblock-fix-memblock_next_valid_pfn.patch removed from -mm tree akpm
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.