Re: sched: fix: initialization of sched_domain_topology for NUMA

From: Peter Zijlstra
Date: Tue May 13 2014 - 06:15:38 EST


On Tue, May 13, 2014 at 11:11:01AM +0200, Vincent Guittot wrote:
> Jet Chen has reported a kernel panics when booting qemu-system-x86_64 with
> kvm64 cpu. A panic occured while building the sched_domain.
>
> In sched_init_numa, we create a new topology table in which both default
> levels and numa levels are copied. The last row of the table must have a null
> pointer in the mask field.
>
> The current implementation doesn't add this last row in the computation of the
> table size. So we add 1 row in the allocation size that will be used as the
> last row of the table. The kzalloc will ensure that the mask field is NULL.
>
> Reported-by: Jet Chen <jet.chen@xxxxxxxxx>
> Tested-by: Jet Chen <jet.chen@xxxxxxxxx>
> Signed-off-by: Vincent Guittot <vincent.guittot@xxxxxxxxxx>
> link: https://lkml.org/lkml/2014/5/12/130
>
> ---
>
> Hi Peter,
>
> Does this commit message contain enough information ?

Yes, thanks!

Attachment: pgpxoPmytK2X0.pgp
Description: PGP signature