Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'cgroup-for-6.17-rc2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup

Pull cgroup fixes from Tejun Heo:

- Fix NULL de-ref in css_rstat_exit() which could happen after
allocation failure

- Fix a cpuset partition handling bug and a couple other misc issues

- Doc spelling fix

* tag 'cgroup-for-6.17-rc2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup:
docs: cgroup: fixed spelling mistakes in documentation
cgroup: avoid null de-ref in css_rstat_exit()
cgroup/cpuset: Remove the unnecessary css_get/put() in cpuset_partition_write()
cgroup/cpuset: Fix a partition error with CPU hotplug
cgroup/cpuset: Use static_branch_enable_cpuslocked() on cpusets_insane_config_key

+10 -8
+2 -2
Documentation/admin-guide/cgroup-v2.rst
··· 435 435 Controlling Controllers 436 436 ----------------------- 437 437 438 - Availablity 439 - ~~~~~~~~~~~ 438 + Availability 439 + ~~~~~~~~~~~~ 440 440 441 441 A controller is available in a cgroup when it is supported by the kernel (i.e., 442 442 compiled in, not disabled and not attached to a v1 hierarchy) and listed in the
+5 -6
kernel/cgroup/cpuset.c
··· 280 280 { 281 281 if (!cpusets_insane_config() && 282 282 movable_only_nodes(nodes)) { 283 - static_branch_enable(&cpusets_insane_config_key); 283 + static_branch_enable_cpuslocked(&cpusets_insane_config_key); 284 284 pr_info("Unsupported (movable nodes only) cpuset configuration detected (nmask=%*pbl)!\n" 285 285 "Cpuset allocations might fail even with a lot of memory available.\n", 286 286 nodemask_pr_args(nodes)); ··· 1843 1843 if (is_partition_valid(cs)) 1844 1844 adding = cpumask_and(tmp->addmask, 1845 1845 xcpus, parent->effective_xcpus); 1846 - } else if (is_partition_invalid(cs) && 1846 + } else if (is_partition_invalid(cs) && !cpumask_empty(xcpus) && 1847 1847 cpumask_subset(xcpus, parent->effective_xcpus)) { 1848 1848 struct cgroup_subsys_state *css; 1849 1849 struct cpuset *child; ··· 3358 3358 else 3359 3359 return -EINVAL; 3360 3360 3361 - css_get(&cs->css); 3362 3361 cpus_read_lock(); 3363 3362 mutex_lock(&cpuset_mutex); 3364 3363 if (is_cpuset_online(cs)) 3365 3364 retval = update_prstate(cs, val); 3366 3365 mutex_unlock(&cpuset_mutex); 3367 3366 cpus_read_unlock(); 3368 - css_put(&cs->css); 3369 3367 return retval ?: nbytes; 3370 3368 } 3371 3369 ··· 3868 3870 partcmd = partcmd_invalidate; 3869 3871 /* 3870 3872 * On the other hand, an invalid partition root may be transitioned 3871 - * back to a regular one. 3873 + * back to a regular one with a non-empty effective xcpus. 3872 3874 */ 3873 - else if (is_partition_valid(parent) && is_partition_invalid(cs)) 3875 + else if (is_partition_valid(parent) && is_partition_invalid(cs) && 3876 + !cpumask_empty(cs->effective_xcpus)) 3874 3877 partcmd = partcmd_update; 3875 3878 3876 3879 if (partcmd >= 0) {
+3
kernel/cgroup/rstat.c
··· 479 479 if (!css_uses_rstat(css)) 480 480 return; 481 481 482 + if (!css->rstat_cpu) 483 + return; 484 + 482 485 css_rstat_flush(css); 483 486 484 487 /* sanity check */