In pcpu_setup_first_chunk() pcpu_reserved_chunk is assigned to point to static chunk. While pcpu_first_chunk is got from below code: pcpu_first_chunk = dchunk ?: schunk; pcpu_first_chunk might point to static chunk too with possibility. Add a WARN_ON here to yell out if that happened.*/ Signed-off-by: Baoquan He <bhe@xxxxxxxxxx> --- mm/percpu.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mm/percpu.c b/mm/percpu.c index 8cf18dc..974600b 100644 --- a/mm/percpu.c +++ b/mm/percpu.c @@ -2275,6 +2275,13 @@ void __init percpu_init_late(void) unsigned long flags; int i; + /* In pcpu_setup_first_chunk() pcpu_reserved_chunk is assigned to point to + * static chunk. While pcpu_first_chunk is got from below code: + * pcpu_first_chunk = dchunk ?: schunk; + * pcpu_first_chunk might point to static chunk too with possibility. Add a + * WARN_ON here to yell out if that happened.*/ + WARN_ON(pcpu_first_chunk == pcpu_reserved_chunk); + for (i = 0; (chunk = target_chunks[i]); i++) { int *map; const size_t size = PERCPU_DYNAMIC_EARLY_SLOTS * sizeof(map[0]); -- 2.4.3 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>