Skip to content
Commit ab31c7fd authored by Huang, Ying's avatar Huang, Ying Committed by Ingo Molnar
Browse files

sched/numa: Fix boot crash on arm64 systems



Qian Cai reported a boot crash on arm64 systems, caused by:

  0fb3978b ("sched/numa: Fix NUMA topology for systems with CPU-less nodes")

The bug is that node_state() must be supplied a valid node_states[] array index,
but in task_numa_placement() the max_nid search can fail with NUMA_NO_NODE,
which is not a valid index.

Fix it by checking that max_nid is a valid index.

[ mingo: Added changelog. ]

Fixes: 0fb3978b ("sched/numa: Fix NUMA topology for systems with CPU-less nodes")
Reported-by: default avatarQian Cai <quic_qiancai@quicinc.com>
Tested-by: default avatarQian Cai <quic_qiancai@quicinc.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: default avatar"Huang, Ying" <ying.huang@intel.com>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 3387ce4d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment