Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

LoongArch: Make cpumask_of_node() robust against NUMA_NO_NODE

The arch definition of cpumask_of_node() cannot handle NUMA_NO_NODE -
which is a valid index - so add a check for this.

Cc: stable@vger.kernel.org
Signed-off-by: John Garry <john.g.garry@oracle.com>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>

authored by

John Garry and committed by
Huacai Chen
94b0c831 abca6583

+1 -1
+1 -1
arch/loongarch/include/asm/topology.h
··· 12 12 13 13 extern cpumask_t cpus_on_node[]; 14 14 15 - #define cpumask_of_node(node) (&cpus_on_node[node]) 15 + #define cpumask_of_node(node) ((node) == NUMA_NO_NODE ? cpu_all_mask : &cpus_on_node[node]) 16 16 17 17 struct pci_bus; 18 18 extern int pcibus_to_node(struct pci_bus *);