Skip to content

Commit 5847c97

Browse files
committed
Merge tag 'cgroup-for-6.8-rc7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup
Pull cgroup fixes from Tejun Heo: "Two cpuset fixes. Both are for bugs in error handling paths and low risk" * tag 'cgroup-for-6.8-rc7-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: cgroup/cpuset: Fix retval in update_cpumask() cgroup/cpuset: Fix a memory leak in update_exclusive_cpumask()
2 parents 29cd507 + 25125a4 commit 5847c97

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

kernel/cgroup/cpuset.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2562,7 +2562,7 @@ static int update_cpumask(struct cpuset *cs, struct cpuset *trialcs,
25622562
update_partition_sd_lb(cs, old_prs);
25632563
out_free:
25642564
free_cpumasks(NULL, &tmp);
2565-
return 0;
2565+
return retval;
25662566
}
25672567

25682568
/**
@@ -2598,9 +2598,6 @@ static int update_exclusive_cpumask(struct cpuset *cs, struct cpuset *trialcs,
25982598
if (cpumask_equal(cs->exclusive_cpus, trialcs->exclusive_cpus))
25992599
return 0;
26002600

2601-
if (alloc_cpumasks(NULL, &tmp))
2602-
return -ENOMEM;
2603-
26042601
if (*buf)
26052602
compute_effective_exclusive_cpumask(trialcs, NULL);
26062603

@@ -2615,6 +2612,9 @@ static int update_exclusive_cpumask(struct cpuset *cs, struct cpuset *trialcs,
26152612
if (retval)
26162613
return retval;
26172614

2615+
if (alloc_cpumasks(NULL, &tmp))
2616+
return -ENOMEM;
2617+
26182618
if (old_prs) {
26192619
if (cpumask_empty(trialcs->effective_xcpus)) {
26202620
invalidate = true;

0 commit comments

Comments
 (0)