rcu/rcuscale: Stop kfree_scale_thread thread(s) after unloading rcuscale
[platform/kernel/linux-starfive.git] / kernel / rcu / rcuscale.c
index 63e4c2d..7854dc3 100644 (file)
@@ -734,6 +734,11 @@ rcu_scale_cleanup(void)
        if (gp_exp && gp_async)
                SCALEOUT_ERRSTRING("No expedited async GPs, so went with async!");
 
+       if (kfree_rcu_test) {
+               kfree_scale_cleanup();
+               return;
+       }
+
        if (torture_cleanup_begin())
                return;
        if (!cur_ops) {