Commit 4a084996 authored by Zhengyuan Liu's avatar Zhengyuan Liu Committed by Yang Yingliang
Browse files

arm64/mm: return cpu_all_mask when node is NUMA_NO_NODE



stable inclusion
from linux-4.19.155
commit 0a2cb1eae0a70acf701600b510de04c55404bb31

--------------------------------

[ Upstream commit a194c5f2 ]

The @node passed to cpumask_of_node() can be NUMA_NO_NODE, in that
case it will trigger the following WARN_ON(node >= nr_node_ids) due to
mismatched data types of @node and @nr_node_ids. Actually we should
return cpu_all_mask just like most other architectures do if passed
NUMA_NO_NODE.

Also add a similar check to the inline cpumask_of_node() in numa.h.

Signed-off-by: default avatarZhengyuan Liu <liuzhengyuan@tj.kylinos.cn>
Reviewed-by: default avatarGavin Shan <gshan@redhat.com>
Link: https://lore.kernel.org/r/20200921023936.21846-1-liuzhengyuan@tj.kylinos.cn


Signed-off-by: default avatarWill Deacon <will@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: default avatarCheng Jian <cj.chengjian@huawei.com>
parent 9be26e9c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment