diff options
author | Richard Palethorpe <rpalethorpe@suse.com> | 2023-10-30 09:25:56 +0000 |
---|---|---|
committer | Edward Liaw <edliaw@google.com> | 2024-01-18 18:21:44 +0000 |
commit | 74f79dc224f4a1e79829ddfa11fa9439bf561423 (patch) | |
tree | 5f5318227dfaf7c53ebf91397fb4d23d76075712 /testcases/kernel/syscalls/execve/execve01.c | |
parent | 454a4dbd424c2574345475e6f01ac4308a91b28b (diff) | |
download | ltp-74f79dc224f4a1e79829ddfa11fa9439bf561423.tar.gz |
cgroup: Fix scanning V1 mount options
The validation in cgroup_find_ctrl did not take into consideration how
we scan V1 mounts. For V1 we try using each mount option as if it is a
controller name. Some mount options contain characters which would be
invalid in a controller name.
This commit ignores errors when scanning V1 mount options.
Ideally we would have a place where we can read the subsys name
knowing that only subsys names will be read from that location. Such
as with V2. One possibility is /proc/cgroups which contains a numeric
value for the hierarchy. However it would require more investigation.
Fixes: #1093
Fixes: 5292c46e5 "cgroup: Handle trailing new line in cgroup.controllers"
Signed-off-by: Richard Palethorpe <rpalethorpe@suse.com>
Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
(cherry picked from commit 6e86277cc5440f781282f8fb982a810b7a5e5a5d)
Test: N/A
Signed-off-by: Edward Liaw <edliaw@google.com>
(cherry picked from https://android-review.googlesource.com/q/commit:22ab8b7c2f44bf29435b14435da3597aedd163d0)
Bug: 305297408
Change-Id: I11e47073bcdafda0a847ddf95bb52a889f498c6b
Merged-In: I11e47073bcdafda0a847ddf95bb52a889f498c6b
Diffstat (limited to 'testcases/kernel/syscalls/execve/execve01.c')
0 files changed, 0 insertions, 0 deletions