@@ -1513,7 +1513,7 @@ static int update_parent_subparts_cpumask(struct cpuset *cs, int cmd,
15131513 spin_unlock_irq (& callback_lock );
15141514
15151515 if (adding || deleting )
1516- update_tasks_cpumask (parent , tmp -> new_cpus );
1516+ update_tasks_cpumask (parent , tmp -> addmask );
15171517
15181518 /*
15191519 * Set or clear CS_SCHED_LOAD_BALANCE when partcmd_update, if necessary.
@@ -1770,10 +1770,13 @@ static int update_cpumask(struct cpuset *cs, struct cpuset *trialcs,
17701770 /*
17711771 * Use the cpumasks in trialcs for tmpmasks when they are pointers
17721772 * to allocated cpumasks.
1773+ *
1774+ * Note that update_parent_subparts_cpumask() uses only addmask &
1775+ * delmask, but not new_cpus.
17731776 */
17741777 tmp .addmask = trialcs -> subparts_cpus ;
17751778 tmp .delmask = trialcs -> effective_cpus ;
1776- tmp .new_cpus = trialcs -> cpus_allowed ;
1779+ tmp .new_cpus = NULL ;
17771780#endif
17781781
17791782 retval = validate_change (cs , trialcs );
@@ -1838,6 +1841,11 @@ static int update_cpumask(struct cpuset *cs, struct cpuset *trialcs,
18381841 }
18391842 spin_unlock_irq (& callback_lock );
18401843
1844+ #ifdef CONFIG_CPUMASK_OFFSTACK
1845+ /* Now trialcs->cpus_allowed is available */
1846+ tmp .new_cpus = trialcs -> cpus_allowed ;
1847+ #endif
1848+
18411849 /* effective_cpus will be updated here */
18421850 update_cpumasks_hier (cs , & tmp , false);
18431851
0 commit comments