00:ffffffff99403e38 EFLAGS: 00010046 [ 0.109861] RAX: 0000000000000001 RBX: 0000000000000001 RCX: 0000000000000001 [ 0.111223] RDX: 0000000000000040 RSI: 0000000000100000 RDI: ffff89597fffae00 [ 0.112577] RBP: 0000000000000005 R08: 0000000000000000 R09: ffff89597fffa200 [ 0.113924] R10: 80000000ffffe000 R11: 0000000000000000 R12: 0000000000000000 [ 0.115294] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 0.116656] FS: 0000000000000000(0000) GS:0000000000000000(0000) knlGS:0000000000000000 [ 0.118193] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 0.119283] CR2: 0000000000004620 CR3: 0000000060048000 CR4: 00000000000000b0 [ 0.120645] Call Trace: [ 0.121122] [ 0.121521] start_kernel+0x5d/0x780 [ 0.122206] x86_64_start_reservations+0x24/0x30 [ 0.123079] x86_64_start_kernel+0xd1/0xe0 [ 0.123860] common_startup_64+0x12c/0x138 [ 0.124641] [ 0.125061] Modules linked in: [ 0.125646] CR2: 0000000000004620 [ 0.126279] ---[ end trace 0000000000000000 ]--- [ 0.127162] RIP: 0010:mm_core_init_early+0x263/0x900 [ 0.128106] Code: 93 ff 72 09 8b 7c 24 30 e8 da 82 00 00 48 63 44 24 30 45 31 db 4c 8b 24 c5 a0 7b 1d 9a 48 89 c3 4c 89 5c 24 50 4c 89 5c 24 58 <41> 83 bc 24 20 46 00 00 00 75 0b 41 83 bc 24 14 47 00 00 00 74 04 [ 0.131676] RSP: 0000:ffffffff99403e38 EFLAGS: 00010046 [ 0.132684] RAX: 0000000000000001 RBX: 0000000000000001 RCX: 0000000000000001 [ 0.134033] RDX: 0000000000000040 RSI: 0000000000100000 RDI: ffff89597fffae00 [ 0.135412] RBP: 0000000000000005 R08: 0000000000000000 R09: ffff89597fffa200 [ 0.136763] R10: 80000000ffffe000 R11: 0000000000000000 R12: 0000000000000000 [ 0.138112] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 [ 0.139487] FS: 0000000000000000(0000) GS:0000000000000000(0000) knlGS:0000000000000000 [ 0.141014] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 0.142094] CR2: 0000000000004620 CR3: 0000000060048000 CR4: 00000000000000b0 [ 0.143448] Kernel panic - not syncing: Attempted to kill the idle task! [ 0.144833] ---[ end Kernel panic - not syncing: Attempted to kill the idle task! ]--- mm_core_init_early+0x263/0x900: free_area_init_node at mm/mm_init.c:1721 (inlined by) free_area_init at mm/mm_init.c:1902 (inlined by) mm_core_init_early at mm/mm_init.c:2681 It crashes at WARN_ON(pgdat->nr_zones || pgdat->kswapd_highest_zoneidx); because pgdat is NULL. With some debug printk's I've figured out that in free_area_init() we have: if (!node_online(nid)) alloc_offline_node_data(nid); pgdat = NODE_DATA(nid); free_area_init_node(nid); But node_online() is true so this allocation doesn't happen, and pgdat remains NULL. And node_online() becomes true in init_cpu_to_node(): if (!node_online(node)) node_set_online(node); But without having a pgdat allocated. I was able to workaround this by changing the code in free_area_init() to if (!node_online(nid) || !NODE_DATA(nid)) alloc_offline_node_data(nid); But I don't have the bigger picture, and also didn't check yet what exactly about this patch results in the failure. Probably ordering of various related actions. Thoughts?[PATCH v3 23/29] arch, mm: consolidate initialization of nodes, zones and memory mapVlastimil Babka undefinedMike Rapoport , Andrew Morton undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefined undefinedƒn†£