* [Devel] [PATCH RHEL10 COMMIT] drivers/base/cpu: fix cpu/offline content inside a ve
[not found] <20260706110002.1024515-17-khorenko@virtuozzo.com>
@ 2026-08-05 20:05 ` Konstantin Khorenko
0 siblings, 0 replies; only message in thread
From: Konstantin Khorenko @ 2026-08-05 20:05 UTC (permalink / raw)
The commit is pushed to "branch-rh10-6.12.0-211.39.1.16.x.vz10-ovz" and will appear at git at bitbucket.org:openvz/vzkernel.git
after rh10-6.12.0-211.39.1.16.2.vz10
------>
commit fdfa48283061fcd77b59e4ba7d182d8af3e4198e
Author: Konstantin Khorenko <khorenko@virtuozzo.com>
Date: Mon Jul 6 12:59:54 2026 +0200
drivers/base/cpu: fix cpu/offline content inside a ve
print_cpus_offline()'s non-super-ve early return passed len (declared
0 at that point, used later only as the sysfs_emit_at() accumulator)
as snprintf()'s size argument, so nothing was ever written to buf.
Since sysfs zeroes the page before calling show(), reading
/sys/devices/system/cpu/offline from inside a ve returned a single
NUL byte instead of the intended empty line ("\n").
Fixes: 44a8c49297f94 ("ve/cpu: handle sysfs attributes for CTs")
Feature: sysfs: per-CT entries visibility and permissions configuration
https://virtuozzo.atlassian.net/browse/VSTOR-137234
Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com>
Reviewed-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
---
drivers/base/cpu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/base/cpu.c b/drivers/base/cpu.c
index 1e992254b12c6..b7ddc8346603c 100644
--- a/drivers/base/cpu.c
+++ b/drivers/base/cpu.c
@@ -263,7 +263,7 @@ static ssize_t print_cpus_offline(struct device *dev,
cpumask_var_t offline;
if (!ve_is_super(get_exec_env()))
- return snprintf(buf, len, "\n");
+ return sysfs_emit(buf, "\n");
/* display offline cpus < nr_cpu_ids */
if (!alloc_cpumask_var(&offline, GFP_KERNEL))
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-08-05 20:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20260706110002.1024515-17-khorenko@virtuozzo.com>
2026-08-05 20:05 ` [Devel] [PATCH RHEL10 COMMIT] drivers/base/cpu: fix cpu/offline content inside a ve Konstantin Khorenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox