Subject: Re: [BUG] sched/cache: "Make LLC id continuous" causes NULL cpumask dereference in build_sched_domains on POWER9

From: Srikar Dronamraju <[email-masked]>
Date: Thu, 28 May 2026 21:36:32 +0530

* Ritesh Harjani <[email-masked]> [2026-05-28 12:24:39]:

> Venkat Rao Bagalkote <[email-masked]> writes:
> 
> > Greetings!!!
> >
> > I am seeing an early boot kernel panic due to NULL pointer dereference 
> > on a POWER9 (pSeries) system when testing linux-next (next-20260522).
> >
> >
> > [    0.039029] NIP [c000000000e58504] _find_first_bit+0x44/0x130
> > [    0.039043] LR [c000000000e58500] _find_first_bit+0x40/0x130
> > [    0.039054] Call Trace:
> > [    0.039060] [c0000000090e7b80] [c00000000416af20] 
> > schedutil_gov+0x0/0xa0 (unreliable)
> > [    0.039076] [c0000000090e7bc0] [c00000000038b3b8] 
> > build_sched_domains+0xad8/0xe50
> > [    0.039089] [c0000000090e7ce0] [c000000003045d78] 
> > sched_init_smp+0xa8/0x164
> > [    0.039102] [c0000000090e7d30] [c00000000300f374] 
> > kernel_init_freeable+0x250/0x370
> > [    0.039117] [c0000000090e7de0] [c000000000011f90] kernel_init+0x34/0x1e4
> > [    0.039129] [c0000000090e7e50] [c00000000000debc] 
> > ret_from_kernel_user_thread+0x14/0x1c
> > [    0.039142] ---- interrupt: 0 at 0x0
> > [    0.039150] Code: 41820090 7c0802a6 393cffff fbe10038 7c7f1b78 
> > fba10028 fbc10030 3bc00000 793dd7e2 f8010050 4bae6e9d 60000000 
> > <e93f0000> 2c290000 408200bc 283c0040
> > [    0.039196] ---[ end trace 0000000000000000 ]---
> >
> >
> 
> Well, I am hitting this on 7.1.0-rc5-next-20260526-00010-gbfac43765a97
> with Qemu Pseries TCG power10/11.
> 

Qemu Pseries guest would be a shared lpar. So thats expected to be similar
to P9. We would not have a coregroup_map allocated.

> [    0.342868][    T1] smp: Bringing up secondary CPUs ...
> [    0.342868][    T1] smp: Bringing up secondary CPUs ...
> [    0.525419][    T1] smp: Brought up 1 node, 4 CPUs
> [    0.525419][    T1] smp: Brought up 1 node, 4 CPUs
> [    0.527992][    T1] numa: Node 0 CPUs: 0-3
> [    0.527992][    T1] numa: Node 0 CPUs: 0-3
> [    0.552787][    T1] BUG: Kernel NULL pointer dereference on read at 0x00000000
> [    0.552787][    T1] BUG: Kernel NULL pointer dereference on read at 0x00000000
> [    0.557446][    T1] Faulting instruction address: 0xc000000000fe3f1c
> [    0.557446][    T1] Faulting instruction address: 0xc000000000fe3f1c
> cpu 0x0: Vector: 300 (Data Access) at [c000000006607800]
>     pc: c000000000fe3f1c: _find_first_bit+0xc/0xc0
>     lr: c00000000027b7d8: build_sched_domains+0xbb4/0x1938
>     sp: c000000006607ac0
>    msr: 8000000002009033
>    dar: 0
>  dsisr: 80000
>   current = 0xc000000006f9fb00
>   paca    = 0xc000000005670000   irqmask: 0x03   irq_happened: 0x09
>     pid   = 1, comm = swapper/0
> Linux version 7.1.0-rc5-next-20260526-00010-gbfac43765a97-dirty (powerpc64le-linux-gnu-gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) #19 SMP PREEMPT Thu May 28 12:29:51 IST 2026
> enter ? for help
> [link register   ] c00000000027b7d8 build_sched_domains+0xbb4/0x1938
> [c000000006607ac0] c00000000027b0a8 build_sched_domains+0x484/0x1938 (unreliable)
> [c000000006607c20] c000000004053180 sched_init_domains+0x114/0x1cc
> [c000000006607c70] c0000000040515e0 sched_init_smp+0x5c/0x17c
> [c000000006607cc0] c000000004012888 kernel_init_freeable+0x258/0x790
> [c000000006607dc0] c000000000011f3c kernel_init+0x34/0x268
> [c000000006607e30] c00000000000debc ret_from_kernel_user_thread+0x14/0x1c
> ---- Exception: 0  at 0000000000000000
> 
> 
> 
> -ritesh

-- 
Thanks and Regards
Srikar Dronamraju