]> git.hungrycats.org Git - linux/commitdiff
torture: Make torture_hrtimeout_*() use TASK_IDLE
authorPaul E. McKenney <paulmck@kernel.org>
Mon, 26 Jun 2023 21:59:29 +0000 (14:59 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 28 Nov 2023 17:15:09 +0000 (17:15 +0000)
[ Upstream commit 872948c665f50a1446e8a34b1ed57bb0b3a9ca4a ]

Given that it is expected that more code will use torture_hrtimeout_*(),
including for longer timeouts, make it use TASK_IDLE instead of
TASK_UNINTERRUPTIBLE.

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 e06b03e987c9fdce32400273a15b56297d145a3c..4a2e0512f91977e561f85cf5e2f4d0080480ae90 100644 (file)
@@ -90,7 +90,7 @@ int torture_hrtimeout_ns(ktime_t baset_ns, u32 fuzzt_ns, struct torture_random_s
 
        if (trsp)
                hto += (torture_random(trsp) >> 3) % fuzzt_ns;
-       set_current_state(TASK_UNINTERRUPTIBLE);
+       set_current_state(TASK_IDLE);
        return schedule_hrtimeout(&hto, HRTIMER_MODE_REL);
 }
 EXPORT_SYMBOL_GPL(torture_hrtimeout_ns);