Skip to content

Commit

Permalink
scftorture: Fix distribution of short handler delays
Browse files Browse the repository at this point in the history
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: e9d338a ("scftorture: Add smp_call_function() torture test")
Signed-off-by: Paul E. McKenney <[email protected]>
  • Loading branch information
paulmckrcu committed Apr 12, 2022
1 parent 99d6a2a commit 8106bdd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions kernel/scftorture.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8106bdd

Please sign in to comment.