]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
torture: Move stutter_wait() timeouts to hrtimers
authorPaul E. McKenney <paulmck@kernel.org>
Mon, 26 Jun 2023 23:52:35 +0000 (16:52 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 28 Nov 2023 17:15:10 +0000 (17:15 +0000)
[ Upstream commit 10af43671e8bf4ac153c4991a17cdf57bc6d2cfe ]

In order to gain better race coverage, move the test start/stop
waits in stutter_wait() to torture_hrtimeout_jiffies().

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Stable-dep-of: cca42bd8eb1b ("rcutorture: Fix stuttering races and other issues")
Signed-off-by: Sasha Levin <sashal@kernel.org>
kernel/torture.c

index 4a2e0512f91977e561f85cf5e2f4d0080480ae90..a55cb70b192fcdedc5baa37d6e961f7db16ebc70 100644 (file)
@@ -734,7 +734,7 @@ bool stutter_wait(const char *title)
                        ret = true;
                }
                if (spt == 1) {
-                       schedule_timeout_interruptible(1);
+                       torture_hrtimeout_jiffies(1, NULL);
                } else if (spt == 2) {
                        while (READ_ONCE(stutter_pause_test)) {
                                if (!(i++ & 0xffff))
@@ -742,7 +742,7 @@ bool stutter_wait(const char *title)
                                cond_resched();
                        }
                } else {
-                       schedule_timeout_interruptible(round_jiffies_relative(HZ));
+                       torture_hrtimeout_jiffies(round_jiffies_relative(HZ), NULL);
                }
                torture_shutdown_absorb(title);
        }