From: Konstantin Khorenko <khorenko@virtuozzo.com>
Subject: [Devel] [PATCH RHEL10 COMMIT] fence-watchdog: return count from watchdog_log_path store
Date: Wed, 5 Aug 2026 16:10:16 +0200 [thread overview]
Message-ID: <202608051410.675EAG6M508463@f0.sw.ru> (raw)
In-Reply-To: <20260706110002.1024515-6-khorenko@virtuozzo.com>
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 b8665131c11adbc94a8bec2a31df322a6ce5be4b
Author: Konstantin Khorenko <khorenko@virtuozzo.com>
Date: Mon Jul 6 12:59:43 2026 +0200
fence-watchdog: return count from watchdog_log_path store
fence_wdog_log_path_store() returned 0 on success instead of the number
of bytes consumed. A sysfs ->store() handler must return @count (or a
negative error); returning 0 tells the VFS that no bytes of the write
were consumed, so a write(2) of the new path makes no progress.
A libc/shell that loops until all bytes are written (e.g. echo > file) then
spins forever, and a single write() reports 0 rather than the requested length.
The path value itself is updated (sscanf ran).
The sibling watchdog_timer and watchdog_action store handlers already
return count; do the same here.
Fixes: 385200750a485 ("fence-watchdog: Add fence-watchdog driver")
Feature: kernel: fense watchdog driver
https://virtuozzo.atlassian.net/browse/VSTOR-137234
Signed-off-by: Konstantin Khorenko <khorenko@virtuozzo.com>
Reviewed-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
---
kernel/fence-watchdog.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/kernel/fence-watchdog.c b/kernel/fence-watchdog.c
index bcbd439d4981f..f7b7bfa9e4d9f 100644
--- a/kernel/fence-watchdog.c
+++ b/kernel/fence-watchdog.c
@@ -276,10 +276,9 @@ static ssize_t fence_wdog_log_path_store(struct kobject *kobj,
if (ret < 0)
return ret;
-
if (sscanf(buf, format, fence_wdog_log_path) != 1)
return -EINVAL;
- return 0;
+ return count;
}
static struct kobj_attribute fence_wdog_timer_attr =
parent reply other threads:[~2026-08-05 14:10 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20260706110002.1024515-6-khorenko@virtuozzo.com>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202608051410.675EAG6M508463@f0.sw.ru \
--to=khorenko@virtuozzo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox