[PATCH 01/33] PCI: Prepare to protect against concurrent isolated cpuset change

Frederic Weisbecker frederic at kernel.org
Wed Dec 31 05:18:59 PST 2025


Le Sun, Dec 28, 2025 at 10:53:41PM -0500, Waiman Long a écrit :
> On 12/28/25 10:23 PM, Zhang Qiao wrote:
> > >   	if (node < 0 || node >= MAX_NUMNODES || !node_online(node) ||
> > >   	    pci_physfn_is_probed(dev)) {
> > > -		cpu = nr_cpu_ids;
> > > +		error = local_pci_probe(&ddi);
> > >   	} else {
> > >   		cpumask_var_t wq_domain_mask;
> > > +		struct pci_probe_arg arg = { .ddi = &ddi };
> > > +
> > > +		INIT_WORK_ONSTACK(&arg.work, local_pci_probe_callback);
> > >   		if (!zalloc_cpumask_var(&wq_domain_mask, GFP_KERNEL)) {
> > >   			error = -ENOMEM;
> > If we return from here, arg.work will not be destroyed.
> > 
> > 
> Right. INIT_WORK_ONSTACK() should be called after successful cpumask_var_t
> allocation.

Doing that, thank you both!

-- 
Frederic Weisbecker
SUSE Labs



More information about the linux-arm-kernel mailing list