On Fri, Jul 18, 2025 at 11:18:54AM +0200, Michal Koutný wrote: > From ace88e9e3a77ff3fe86aee4b7a5866b3bfd2df58 Mon Sep 17 00:00:00 2001 > From: =?UTF-8?q?Michal=20Koutn=C3=BD?= <[email protected]> > Date: Thu, 17 Jul 2025 17:38:47 +0200 > Subject: [PATCH] cgroup: Add compatibility option for content of /proc/cgroups > MIME-Version: 1.0 > Content-Type: text/plain; charset=UTF-8 > Content-Transfer-Encoding: 8bit > > /proc/cgroups lists only v1 controllers by default, however, this is > only enforced since the commit af000ce85293b ("cgroup: Do not report > unavailable v1 controllers in /proc/cgroups") and there is software in > the wild that uses content of /proc/cgroups to decide on availability of > v2 (sic) controllers. > > Add a boottime param that can bring back the previous behavior for > setups where the check in the software cannot be changed and it causes > e.g. unintended OOMs. > > Also, this patch takes out cgrp_v1_visible from cgroup1_subsys_absent() > guard since it's only important to check which hierarchy (v1 vs v2) the > subsys is attached to. This has no effect on the printed message but > the code is cleaner since cgrp_v1_visible is really about mounted > hierarchies, not the content of /proc/cgroups. > > Link: > https://lore.kernel.org/r/[email protected] > Fixes: af000ce85293b ("cgroup: Do not report unavailable v1 controllers in > /proc/cgroups") > Fixes: a0ab1453226d8 ("cgroup: Print message when /proc/cgroups is read on > v2-only system") > Signed-off-by: Michal Koutný <[email protected]>
Applied to cgroup/for-6.17. Thanks. -- tejun

