Skip to content

Commit c198b19

Browse files
Chen Ridonggregkh
authored andcommitted
cpuset: Use new excpus for nocpu error check when enabling root partition
[ Upstream commit 59d5de3655698679ad8fd2cc82228de4679c4263 ] A previous patch fixed a bug where new_prs should be assigned before checking housekeeping conflicts. This patch addresses another potential issue: the nocpu error check currently uses the xcpus which is not updated. Although no issue has been observed so far, the check should be performed using the new effective exclusive cpus. The comment has been removed because the function returns an error if nocpu checking fails, which is unrelated to the parent. Signed-off-by: Chen Ridong <[email protected]> Reviewed-by: Waiman Long <[email protected]> Signed-off-by: Tejun Heo <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 47f3af1 commit c198b19

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

kernel/cgroup/cpuset.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1728,11 +1728,7 @@ static int update_parent_effective_cpumask(struct cpuset *cs, int cmd,
17281728
if (prstate_housekeeping_conflict(new_prs, xcpus))
17291729
return PERR_HKEEPING;
17301730

1731-
/*
1732-
* A parent can be left with no CPU as long as there is no
1733-
* task directly associated with the parent partition.
1734-
*/
1735-
if (nocpu)
1731+
if (tasks_nocpu_error(parent, cs, xcpus))
17361732
return PERR_NOCPUS;
17371733

17381734
/*

0 commit comments

Comments
 (0)