linux/kernel/cgroup
Linus Torvalds 11f00074f7 cgroup: Fixes for v7.1-rc2
- During v6.19, cgroup task unlink was moved from do_exit() to after the
   final task switch to satisfy a controller invariant. That left the kernel
   seeing tasks past exit_signals() longer than userspace expected, and
   several v7.0 follow-ups tried to bridge the gap by making rmdir wait for
   the kernel side. None held up. The latest is an A-A deadlock when rmdir
   is invoked by the reaper of zombies whose pidns teardown the rmdir itself
   is waiting on, which points at the synchronizing approach being
   fundamentally wrong:
 
   - Take a different approach: drop the wait, leave rmdir's user-visible
     side returning as soon as cgroup.procs is empty, and defer the css
     percpu_ref kill that drives ->css_offline() until the cgroup is fully
     depopulated.
 
   - Tagged for stable. Somewhat invasive but contained. The hope is that
     fixing forward sticks. If not, the fallback is to revert the entire
     chain and rework on the development branch.
 
   - Doesn't plug a pre-existing analogous race in
     cgroup_apply_control_disable() (controller disable via subtree_control).
     Not a regression. The development branch will do the more invasive
     restructuring needed for that.
 
 - Documentation update for cgroup-v1 charge-commit section that still
   referenced functions removed when the memcg hugetlb try-commit-cancel
   protocol was retired.
 -----BEGIN PGP SIGNATURE-----
 
 iIQEABYKACwWIQTfIjM1kS57o3GsC/uxYfJx3gVYGQUCafphbw4cdGpAa2VybmVs
 Lm9yZwAKCRCxYfJx3gVYGbydAQDxlEIeJPdJlwbU6X4PBW/7DYeDHABG7OdrFf5K
 Fq4ECAD/ZHsFyCNEOcZym6t2/FCZR0xbaPGQibLt3er6AkLRFwM=
 =3Jra
 -----END PGP SIGNATURE-----

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

Pull cgroup fixes from Tejun Heo:

 - During v6.19, cgroup task unlink was moved from do_exit() to after the
   final task switch to satisfy a controller invariant. That left the kernel
   seeing tasks past exit_signals() longer than userspace expected, and
   several v7.0 follow-ups tried to bridge the gap by making rmdir wait for
   the kernel side. None held up.

   The latest is an A-A deadlock when rmdir is invoked by the reaper of
   zombies whose pidns teardown the rmdir itself is waiting on, which
   points at the synchronizing approach being fundamentally wrong.

   Take a different approach: drop the wait, leave rmdir's user-visible
   side returning as soon as cgroup.procs is empty, and defer the css
   percpu_ref kill that drives ->css_offline() until the cgroup is fully
   depopulated.

   Tagged for stable. Somewhat invasive but contained. The hope is that
   fixing forward sticks. If not, the fallback is to revert the entire
   chain and rework on the development branch.

   Note that this doesn't plug a pre-existing analogous race in
   cgroup_apply_control_disable() (controller disable via
   subtree_control). Not a regression. The development branch will do
   the more invasive restructuring needed for that.

 - Documentation update for cgroup-v1 charge-commit section that still
   referenced functions removed when the memcg hugetlb try-commit-cancel
   protocol was retired.

* tag 'cgroup-for-7.1-rc2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup:
  docs: cgroup-v1: Update charge-commit section
  cgroup: Defer css percpu_ref kill on rmdir until cgroup is depopulated
2026-05-05 15:43:32 -07:00
..
cgroup-internal.h cgroup: Expose some cgroup helpers 2026-03-05 18:15:58 -10:00
cgroup-v1.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
cgroup.c cgroup: Fixes for v7.1-rc2 2026-05-05 15:43:32 -07:00
cpuset-internal.h cgroup/cpuset: record DL BW alloc CPU for attach rollback 2026-04-17 08:57:37 -10:00
cpuset-v1.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
cpuset.c cgroup/cpuset: record DL BW alloc CPU for attach rollback 2026-04-17 08:57:37 -10:00
debug.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
dmem.c cgroup/dmem: remove region parameter from dmemcg_parse_limit 2026-03-21 09:24:02 -10:00
freezer.c cgroup: cgroup.stat.local time accounting 2025-08-22 07:50:43 -10:00
legacy_freezer.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
Makefile kernel/cgroup: Add "dmem" memory accounting cgroup 2025-01-06 17:24:38 +01:00
misc.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
namespace.c treewide: Replace kmalloc with kmalloc_obj for non-scalar types 2026-02-21 01:02:28 -08:00
pids.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
rdma.c cgroup/rdma: fix integer overflow in rdmacg_try_charge() 2026-04-17 07:25:27 -10:00
rstat.c cgroup: rstat: use LOCK CMPXCHG in css_rstat_updated 2025-12-08 08:26:56 -10:00