Commit 66f40b9
cgroup/cpuset: Fix a memory leak in update_exclusive_cpumask()
Fix a possible memory leak in update_exclusive_cpumask() by moving the
alloc_cpumasks() down after the validate_change() check which can fail
and still before the temporary cpumasks are needed.
Fixes: e2ffe50 ("cgroup/cpuset: Add cpuset.cpus.exclusive for v2")
Reported-and-tested-by: Mirsad Todorovac <mirsad.todorovac@alu.hr>
Closes: https://lore.kernel.org/lkml/14915689-27a3-4cd8-80d2-9c30d0c768b6@alu.unizg.hr
Signed-off-by: Waiman Long <longman@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: stable@vger.kernel.org # v6.7+1 parent e326df5 commit 66f40b9
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2598 | 2598 | | |
2599 | 2599 | | |
2600 | 2600 | | |
2601 | | - | |
2602 | | - | |
2603 | | - | |
2604 | 2601 | | |
2605 | 2602 | | |
2606 | 2603 | | |
| |||
2615 | 2612 | | |
2616 | 2613 | | |
2617 | 2614 | | |
| 2615 | + | |
| 2616 | + | |
| 2617 | + | |
2618 | 2618 | | |
2619 | 2619 | | |
2620 | 2620 | | |
| |||
0 commit comments