lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <5b5da2d3-37b3-60ee-5a94-149094cbe9dc@huawei.com>
Date: Fri, 26 Apr 2024 12:55:04 +0800
From: Lu Jialin <lujialin4@...wei.com>
To: Tejun Heo <tj@...nel.org>, Zefan Li <lizefan.x@...edance.com>, Johannes
 Weiner <hannes@...xchg.org>
CC: <cgroups@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: [QUESTION]cgroup mount return -EBUSY

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ