Commit 292fd84
cgroup/cpuset: Fix partition root's cpuset.cpus update bug
It was found that commit 7a2127e ("cpuset: Call
set_cpus_allowed_ptr() with appropriate mask for task") introduced a bug
that corrupted "cpuset.cpus" of a partition root when it was updated.
It is because the tmp->new_cpus field of the passed tmp parameter
of update_parent_subparts_cpumask() should not be used at all as
it contains important cpumask data that should not be overwritten.
Fix it by using tmp->addmask instead.
Also update update_cpumask() to make sure that trialcs->cpu_allowed
will not be corrupted until it is no longer needed.
Fixes: 7a2127e ("cpuset: Call set_cpus_allowed_ptr() with appropriate mask for task")
Signed-off-by: Waiman Long <longman@redhat.com>
Cc: stable@vger.kernel.org # v6.2+
Signed-off-by: Tejun Heo <tj@kernel.org>1 parent fcdb1ed commit 292fd84
1 file changed
Lines changed: 10 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1513 | 1513 | | |
1514 | 1514 | | |
1515 | 1515 | | |
1516 | | - | |
| 1516 | + | |
1517 | 1517 | | |
1518 | 1518 | | |
1519 | 1519 | | |
| |||
1770 | 1770 | | |
1771 | 1771 | | |
1772 | 1772 | | |
| 1773 | + | |
| 1774 | + | |
| 1775 | + | |
1773 | 1776 | | |
1774 | 1777 | | |
1775 | 1778 | | |
1776 | | - | |
| 1779 | + | |
1777 | 1780 | | |
1778 | 1781 | | |
1779 | 1782 | | |
| |||
1838 | 1841 | | |
1839 | 1842 | | |
1840 | 1843 | | |
| 1844 | + | |
| 1845 | + | |
| 1846 | + | |
| 1847 | + | |
| 1848 | + | |
1841 | 1849 | | |
1842 | 1850 | | |
1843 | 1851 | | |
| |||
0 commit comments