summaryrefslogtreecommitdiffstats
path: root/kernel/scftorture.c
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@kernel.org>2022-02-28 17:40:49 -0800
committerPaul E. McKenney <paulmck@kernel.org>2022-04-11 17:07:29 -0700
commit8106bddbab5f0ba180e6d693c7c1fc6926d57caa (patch)
treebe9cc31079ec27731d809254f5d85d9392bb4ccb /kernel/scftorture.c
parent99d6a2acb8955f12489bfba04f2db22bc0b57726 (diff)
downloadlinux-8106bddbab5f0ba180e6d693c7c1fc6926d57caa.tar.gz
linux-8106bddbab5f0ba180e6d693c7c1fc6926d57caa.tar.bz2
linux-8106bddbab5f0ba180e6d693c7c1fc6926d57caa.zip
scftorture: Fix distribution of short handler delays
The scftorture test module's scf_handler() function is supposed to provide three different distributions of short delays (including "no delay") and one distribution of long delays, if specified by the scftorture.longwait module parameter. However, the second of the two non-zero-wait short delays is disabled due to the first such delay's "goto out" not being enclosed in the "then" clause with the "udelay()". This commit therefore adjusts the code to provide the intended set of delays. Fixes: e9d338a0b179 ("scftorture: Add smp_call_function() torture test") Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'kernel/scftorture.c')
-rw-r--r--kernel/scftorture.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/scftorture.c b/kernel/scftorture.c
index dcb0410950e4..5d113aa59e77 100644
--- a/kernel/scftorture.c
+++ b/kernel/scftorture.c
@@ -267,9 +267,10 @@ static void scf_handler(void *scfc_in)
}
this_cpu_inc(scf_invoked_count);
if (longwait <= 0) {
- if (!(r & 0xffc0))
+ if (!(r & 0xffc0)) {
udelay(r & 0x3f);
- goto out;
+ goto out;
+ }
}
if (r & 0xfff)
goto out;