Linux EDAC development
 help / color / mirror / Atom feed
* [PATCH 1/2] edac: edac_device_sysfs: reject poll_msec value 0
@ 2026-07-08 14:09 Jad Keskes
  2026-07-08 14:10 ` [PATCH 2/2] edac: edac_device: don't re-arm workqueue during teardown Jad Keskes
  2026-07-10  3:24 ` [PATCH 1/2] edac: edac_device_sysfs: reject poll_msec value 0 Borislav Petkov
  0 siblings, 2 replies; 3+ messages in thread
From: Jad Keskes @ 2026-07-08 14:09 UTC (permalink / raw)
  To: Borislav Petkov, Tony Luck; +Cc: linux-edac, linux-kernel, Jad Keskes

The comment says it must be at least 1ms but there was never a check.
Writing 0 sets the workqueue delay to 0 jiffies, which makes it spin.

Signed-off-by: Jad Keskes <inasj268@gmail.com>
---
 drivers/edac/edac_device_sysfs.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/edac/edac_device_sysfs.c b/drivers/edac/edac_device_sysfs.c
index da804ebe3626..3137cf6cf36b 100644
--- a/drivers/edac/edac_device_sysfs.c
+++ b/drivers/edac/edac_device_sysfs.c
@@ -117,6 +117,10 @@ static ssize_t edac_device_ctl_poll_msec_store(struct edac_device_ctl_info
 	ret = kstrtoul(data, 0, &value);
 	if (ret < 0)
 		return ret;
+
+	if (value < 1)
+		return -EINVAL;
+
 	edac_device_reset_delay_period(ctl_info, value);
 
 	return count;
-- 
2.55.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-07-10  3:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-08 14:09 [PATCH 1/2] edac: edac_device_sysfs: reject poll_msec value 0 Jad Keskes
2026-07-08 14:10 ` [PATCH 2/2] edac: edac_device: don't re-arm workqueue during teardown Jad Keskes
2026-07-10  3:24 ` [PATCH 1/2] edac: edac_device_sysfs: reject poll_msec value 0 Borislav Petkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox