Re: [PATCH -next] cgroup/cpuset: fix null-ptr-deref in rebuild_sched_domains_cpuslocked

From: Chen Ridong

Date: Wed Feb 25 2026 - 19:40:44 EST




On 2026/2/26 1:40, Tejun Heo wrote:
> Hello,
>
> Applied to cgroup/for-7.0-fixes with the following modification:
>
> - Moved the NULL check into the for-loop condition per Waiman's
> suggestion.
>
> - for (i = 0; i < ndoms; ++i) {
> - if (doms && WARN_ON_ONCE(!cpumask_subset(doms[i],
> - cpu_active_mask)))
> + for (i = 0; doms && i < ndoms; i++) {
> + if (WARN_ON_ONCE(!cpumask_subset(doms[i], cpu_active_mask)))
>
> Thanks.
>
> --
> tejun

Thank you.

--
Best regards,
Ridong