[Devel] [PATCH hci-8.2 1/3] ve/kernfs: count repeated slashes in a permission path as one
no-reply at sashiko.virtuozzo.com
no-reply at sashiko.virtuozzo.com
Tue Dec 1 14:50:24 MSK 2026
> kernfs_perms_set() stops at the first empty component of the path and
> applies the mode to the node it reached so far:
>
> rule applied to
> cpuN/cache/uevent rw cpuN/cache/uevent
> cpuN/cache//uevent rw cpuN/cache
>
> vzctl writes such rules: it passes the cpuN/cache directory with a
> trailing slash and appends "/<child>" for each child, so in every
> Container cpuN/cache ends up "rw" without "x". A recent mongod 8.0
> (tcmalloc) reads cpuN/cache/indexM/shared_cpu_list on start, gets EACCES
> and aborts.
>
> Walk the path with kernfs_walk_and_get(), which skips empty components
> as a path lookup does.
>
> https://virtuozzo.atlassian.net/browse/VSTOR-158149
>
> Fixes: 57739dce06d0 ("ve/kernfs: add new interface to control per-VE nodes visibility")
> Feature: sysfs: per-CT entries visibility and permissions configuration
> Signed-off-by: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
Sashiko has reviewed this patch and found no issues.
Carry the trailer below into the next revision and Sashiko will not review this patch again.
Reviewed-by: Sashiko <no-reply at sashiko.virtuozzo.com>
--
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261201-ve-perms-skip-slashes-v1-0-a444e8767c3e@virtuozzo.com?part=1
More information about the Devel
mailing list