Re: 回复: [PATCH] scsi: mpt3sas: Fix invalid NUMA node index

From: John Garry

Date: Mon Jan 26 2026 - 03:33:47 EST


*/
if (ioc->high_iops_queues) {
- mask = cpumask_of_node(dev_to_node(&ioc->pdev->dev));
+ int nid = dev_to_node(&ioc->pdev->dev);
+
+ if (nid == NUMA_NO_NODE)
+ nid = 0;
+ mask = cpumask_of_node(nid);

Some versions of cpumask_of_node() handle NUMA_NO_NODE gracefully and
some don't.

For the core drivers/base/arch_numa.c version, it returns cpu_all_mask
(for NUMA_NO_NODE) - so your behaviour here is different.

I sent a series to make all versions of cpumask_of_node() handle NUMA_NO_NODE:
https://lore.kernel.org/lkml/20260107094007.966496-1-john.g.garry@xxxxxxxxxx/

Please check it and provide Tested-by/Reviewed-by tags if you are happy with it.

Thanks,
John