rcuscale: Rename kfree_rcu() to kfree_rcu_mightsleep()
authorUladzislau Rezki (Sony) <urezki@gmail.com>
Wed, 1 Feb 2023 15:09:52 +0000 (16:09 +0100)
committerJoel Fernandes (Google) <joel@joelfernandes.org>
Wed, 5 Apr 2023 13:48:04 +0000 (13:48 +0000)
The kfree_rcu() and kvfree_rcu() macros' single-argument forms are
deprecated.  Therefore switch to the new kfree_rcu_mightsleep() and
kvfree_rcu_mightsleep() variants. The goal is to avoid accidental use
of the single-argument forms, which can introduce functionality bugs in
atomic contexts and latency bugs in non-atomic contexts.

Acked-by: Joel Fernandes (Google) <joel@joelfernandes.org>
Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org>
kernel/rcu/rcuscale.c

index 91fb5905a008ff243039e4d967d76deb187537ec..98b75995b68068b568d02e6923ac9eb2caad0349 100644 (file)
@@ -716,7 +716,7 @@ kfree_scale_thread(void *arg)
                        // is tested.
                        if ((kfree_rcu_test_single && !kfree_rcu_test_double) ||
                                        (kfree_rcu_test_both && torture_random(&tr) & 0x800))
-                               kfree_rcu(alloc_ptr);
+                               kfree_rcu_mightsleep(alloc_ptr);
                        else
                                kfree_rcu(alloc_ptr, rh);
                }