Re: [PATCH v10 27/38] dyndbg-test: add do_bulk testpoint, rename do_prints to do_classes
From: sashiko-bot@kernel.org
Date: 2026-09-16 16:37:33
Also in:
dri-devel
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Medium] test_dynamic_debug: unkillable process in do_bulk and do_classes -- commit 6245dc1853df17e050ea8032572222d30c017fd7 Author: Jim Cromie [off-list ref] dyndbg-test: add do_bulk testpoint, rename do_prints to do_classes This commit introduces a do_bulk testpoint and renames do_prints to do_classes in the test_dynamic_debug module. These changes allow generating high-volume workloads with a single sysfs write to better support testing of dynamic debug features.
quoted hunk ↗ jump to hunk
diff --git a/lib/test_dynamic_debug.c b/lib/test_dynamic_debug.c index 01ce07001d4c7..560e23f14ac8f 100644 --- a/lib/test_dynamic_debug.c +++ b/lib/test_dynamic_debug.c
[ ... ]
-static void do_prints(void)
+static void do_classes(unsigned int ct)
{
- pr_debug("do_prints:\n");
- do_cats();
- do_levels();
+ /* maybe clamp this */
+ pr_debug("do_classes %u times:\n", ct);
+ for (; ct; ct--) {
+ do_cats();
+ do_levels();
+ cond_resched();[Severity: Medium] Can this loop in do_classes() run indefinitely without checking for signals? If a large integer (e.g., UINT_MAX) is written to the do_classes sysfs parameter, the lack of fatal_signal_pending() or signal_pending() prevents the test from being gracefully aborted via SIGKILL or SIGINT. This could trap the process in kernel space and flood syslog/journald.
+ }
+}
+
+static void do_bulk(unsigned int ct)
+{
+ unsigned int i;
+
+ pr_debug("do_bulk %u times:\n", ct);
+ for (i = 0; i < ct; i++) {
+ pr_debug("bulk msg %u.0\n", i + 1);
+ pr_debug("bulk msg %u.1\n", i + 1);
+ pr_debug("bulk msg %u.2\n", i + 1);
+ pr_debug("bulk msg %u.3\n", i + 1);
+ pr_debug("bulk msg %u.4\n", i + 1);
+ pr_debug("bulk msg %u.5\n", i + 1);
+ pr_debug("bulk msg %u.6\n", i + 1);
+ pr_debug("bulk msg %u.7\n", i + 1);
+ pr_debug("bulk msg %u.8\n", i + 1);
+ pr_debug("bulk msg %u.9\n", i + 1);
+ cond_resched();[Severity: Medium] Similarly, does this loop in do_bulk() also need a signal check? A process writing a large value to the do_bulk sysfs parameter could become unkillable for an extended period, preventing process termination.
+ } }
-- Sashiko AI review · https://sashiko.dev/#/patchset/20260916-dd-cmap-part2-clean-v10-0-af4cf4767707@gmail.com?part=27