Skip to content

Commit e37f72b

Browse files
committed
Merge tag 'cgroup-for-6.15-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup
Pull cgroup fixes from Tejun Heo: - A number of cpuset remote partition related fixes and cleanups along with selftest updates. - A change from this merge window made cgroup_rstat_updated_list() called outside cgroup_rstat_lock leading to list corruptions. Fix it by relocating the call inside the lock. * tag 'cgroup-for-6.15-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: cgroup/cpuset: Fix race between newly created partition and dying one cgroup: rstat: call cgroup_rstat_updated_list with cgroup_rstat_lock selftest/cgroup: Add a remote partition transition test to test_cpuset_prs.sh selftest/cgroup: Clean up and restructure test_cpuset_prs.sh selftest/cgroup: Update test_cpuset_prs.sh to use | as effective CPUs and state separator cgroup/cpuset: Remove unneeded goto in sched_partition_write() and rename it cgroup/cpuset: Code cleanup and comment update cgroup/cpuset: Don't allow creation of local partition over a remote one cgroup/cpuset: Remove remote_partition_check() & make update_cpumasks_hier() handle remote partition cgroup/cpuset: Fix error handling in remote_partition_disable() cgroup/cpuset: Fix incorrect isolated_cpus update in update_parent_effective_cpumask()
2 parents 97c484c + a22b3d5 commit e37f72b

File tree

7 files changed

+651
-380
lines changed

7 files changed

+651
-380
lines changed

include/linux/cgroup-defs.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -710,6 +710,7 @@ struct cgroup_subsys {
710710
void (*css_released)(struct cgroup_subsys_state *css);
711711
void (*css_free)(struct cgroup_subsys_state *css);
712712
void (*css_reset)(struct cgroup_subsys_state *css);
713+
void (*css_killed)(struct cgroup_subsys_state *css);
713714
void (*css_rstat_flush)(struct cgroup_subsys_state *css, int cpu);
714715
int (*css_extra_stat_show)(struct seq_file *seq,
715716
struct cgroup_subsys_state *css);

include/linux/cgroup.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ static inline u64 cgroup_id(const struct cgroup *cgrp)
344344
*/
345345
static inline bool css_is_dying(struct cgroup_subsys_state *css)
346346
{
347-
return !(css->flags & CSS_NO_REF) && percpu_ref_is_dying(&css->refcnt);
347+
return css->flags & CSS_DYING;
348348
}
349349

350350
static inline void cgroup_get(struct cgroup *cgrp)

kernel/cgroup/cgroup.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5923,6 +5923,12 @@ static void kill_css(struct cgroup_subsys_state *css)
59235923
if (css->flags & CSS_DYING)
59245924
return;
59255925

5926+
/*
5927+
* Call css_killed(), if defined, before setting the CSS_DYING flag
5928+
*/
5929+
if (css->ss->css_killed)
5930+
css->ss->css_killed(css);
5931+
59265932
css->flags |= CSS_DYING;
59275933

59285934
/*

kernel/cgroup/cpuset-internal.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ enum prs_errcode {
3333
PERR_CPUSEMPTY,
3434
PERR_HKEEPING,
3535
PERR_ACCESS,
36+
PERR_REMOTE,
3637
};
3738

3839
/* bits in struct cpuset flags field */

0 commit comments

Comments
 (0)