aboutsummaryrefslogtreecommitdiff
path: root/Documentation/DocBook
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2014-04-07 16:44:47 -0400
committerTejun Heo <tj@kernel.org>2014-04-07 16:44:47 -0400
commit49957f8e2a43035a97d05bddefa394492a969c0d (patch)
tree853fb807131438d7fb497d9fbc8e09d0c8efe4a8 /Documentation/DocBook
parentc6b3d5bcd67c75961a1e8b9564d1475c0f194a84 (diff)
cgroup: newly created dirs and files should be owned by the creator
While converting cgroup to kernfs, 2bd59d48ebfb ("cgroup: convert to kernfs") accidentally dropped the logic which makes newly created cgroup dirs and files owned by the current uid / gid. This broke cases where cgroup subtree management is delegated to !root as the sub manager wouldn't be able to create more than single level of hierarchy or put tasks into child cgroups it created. Among other things, this breaks user session management in systemd and one of the symptoms was 90s hang during shutdown. User session systemd running as the user creates a sub-service to initiate shutdown and tries to put kill(1) into it but fails because cgroup.procs is owned by root. This leads to 90s hang during shutdown. Implement cgroup_kn_set_ugid() which sets a kn's uid and gid to those of the caller and use it from file and dir creation paths. Signed-off-by: Tejun Heo <tj@kernel.org> Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation/DocBook')
0 files changed, 0 insertions, 0 deletions