]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
scftorture: Wait until scf_cleanup_handler() completes.
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Fri, 8 Nov 2024 10:39:32 +0000 (11:39 +0100)
committerPaul E. McKenney <paulmck@kernel.org>
Sat, 9 Nov 2024 17:00:46 +0000 (09:00 -0800)
The smp_call_function() needs to be invoked with the wait flag set to
wait until scf_cleanup_handler() is done. This ensures that all SMP
function calls, that have been queued earlier, complete at this point.

Tested-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Reviewed-by: Boqun Feng <boqun.feng@gmail.com>
Tested-by: Boqun Feng <boqun.feng@gmail.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
kernel/scftorture.c

index 455cbff35a1a258e0171c0e6853de3a861f02c97..654702f75c54b240b5e45193f87015e47024aabc 100644 (file)
@@ -523,7 +523,7 @@ static void scf_torture_cleanup(void)
                        torture_stop_kthread("scftorture_invoker", scf_stats_p[i].task);
        else
                goto end;
-       smp_call_function(scf_cleanup_handler, NULL, 0);
+       smp_call_function(scf_cleanup_handler, NULL, 1);
        torture_stop_kthread(scf_torture_stats, scf_torture_stats_task);
        scf_torture_stats_print();  // -After- the stats thread is stopped!
        kfree(scf_stats_p);  // -After- the last stats print has completed!