mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [QUESTION]cgroup mount return -EBUSY
@ 2024-04-26  4:55 Lu Jialin
  2024-05-06  1:50 ` Lu Jialin
  0 siblings, 1 reply; 2+ messages in thread
From: Lu Jialin @ 2024-04-26  4:55 UTC (permalink / raw)
  To: Tejun Heo, Zefan Li, Johannes Weiner; +Cc: cgroups, linux-kernel

Hello

I encountered a problem when I try to unmount the subsystem right after
all it's subcgroups are removed, the cgroup_root would remain. Mounting
this subsystem to another cgroup_root would return -EBUSY.

The problem could be reproduced with the following script.

test.sh:

mkdir /tmp/test1
mount -t cgroup -o pids pids /tmp/test1
mkdir /tmp/test1/test
rmdir /tmp/test1/test
umount /tmp/test1
mkdir /tmp/test
mount -t cgroup -o pids,cpu none /tmp/test

test.sh should return this.
mount: mounting none on /tmp/test failed: Device or resource busy.

It seems that when unmounting /tmp/test1, the original cgroup_root for
this PID is not released.
/test # cat /proc/cgroups

#subsys_name    hierarchy       num_cgroups     enabled

cpuset  0       1       1

cpu     0       1       1

cpuacct 0       1       1

blkio   0       1       1

devices 0       1       1

freezer 0       1       1

net_cls 0       1       1

perf_event      0       1       1

net_prio        0       1       1

hugetlb 0       1       1

pids    1       1       1

rdma    0       1       1

misc    0       1       1

debug   0       1       1

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-05-06  1:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-26  4:55 [QUESTION]cgroup mount return -EBUSY Lu Jialin
2024-05-06  1:50 ` Lu Jialin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®