Re: [PATCH 2/2] xen/sched: fix schedule_dump() handling of free cpus

Andrew Cooper <[email protected]> Wed, 29 Jul 2026 13:25:17 +0100
Newsgroups gmane.comp.emulators.xen.devel
Message-ID <[email protected]>
On 29/07/2026 1:06 pm, Juergen Gross wrote:
> With the introduction of core scheduling cpus not used by any cpupool

You want a comma between "scheduling, cpus".  It took a little while to
figure out the correct parsing of this sentence.

As written, it's ambiguous with one interpretation being "With the
introduction of core scheduling cpus, ..." but with a grammatically
invalid remainder of the sentence.

> have been switched to use the very simple idle scheduler instead of the
> default scheduler.
>
> Trying to obtain diagnostic scheduling data via the "r" debug key is
> scanning through all cpupools using the per-cpupool scheduler to print
> the related data. Unfortunately the switch to use the idle scheduler
> for free cpus wasn't reflected in schedule_dump(), causing the default
> scheduler's dump_cpu_state callback to be used for free cpus.
>
> This causes NULL dereferences in case the default scheduler is one of
> credit or null.
>
> Fix that by using the idle scheduler instead of the default scheduler
> for free cpus. Note that it is fine for a scheduler to have no
> dump_cpu_state callback.
>
> Fixes: f855dd962523 ("sched: add minimalistic idle scheduler for free cpus")
> Reported-by: Dietmar Hahn <[email protected]>
> Tested-by:  Dietmar Hahn <[email protected]>
> Signed-off-by: Juergen Gross <[email protected]>

FWIW, Acked-by: Andrew Cooper <[email protected]>