[PATCH v15 clocksource] Prohibit clocksource watchdog test when HZ<100

From: Paul E. McKenney
Date: Wed Jul 21 2021 - 17:27:58 EST


As noted in a comment, use of the TEST_CLOCKSOURCE_WATCHDOG kconfig
option is prohibited when HZ is less than 100 in order to avoid signed
integer overflow. However, comments can easily be ignored even when they
are actually read. Therefore, add a "depends" clause to prohibit use
of the TEST_CLOCKSOURCE_WATCHDOG kconfig option when HZ is less than 100.

Reported-by: kernel test robot <lkp@xxxxxxxxx>
Tested-by: Rong Chen <rong.a.chen@xxxxxxxxx>
Signed-off-by: Paul E. McKenney <paulmck@xxxxxxxxxx>
Link: https://lore.kernel.org/lkml/202107040532.wqL30yFp-lkp@xxxxxxxxx/

diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 831212722924c..79487f3dad430 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -2612,6 +2612,7 @@ config TEST_FPU
config TEST_CLOCKSOURCE_WATCHDOG
tristate "Test clocksource watchdog in kernel space"
depends on CLOCKSOURCE_WATCHDOG
+ depends on HZ >= 100
help
Enable this option to create a kernel module that will trigger
a test of the clocksource watchdog. This module may be loaded