rcu/kvfree: Eliminate k[v]free_rcu() single argument macro
authorUladzislau Rezki (Sony) <urezki@gmail.com>
Wed, 1 Feb 2023 15:09:54 +0000 (16:09 +0100)
committerPaul E. McKenney <paulmck@kernel.org>
Wed, 10 May 2023 00:26:20 +0000 (17:26 -0700)
commit7e3f926bf4538cb4988b3e3f8bc1cb4a603b2ef6
tree9cb6cc91238eae50f91ec626afbeb6b86c43b4e7
parentac9a78681b921877518763ba0e89202254349d1b
rcu/kvfree: Eliminate k[v]free_rcu() single argument macro

The kvfree_rcu() and kfree_rcu() APIs are hazardous in that if you forget
the second argument, it works, but might sleep.  This sleeping can be a
correctness bug from atomic contexts, and even in non-atomic contexts it
might introduce unacceptable latencies.  This commit therefore removes the
single-argument kvfree_rcu() and kfree_rcu() macros.  Code that would have
previously used these single-argument kvfree_rcu() and kfree_rcu() macros
should instead use kvfree_rcu_mightsleep() or kfree_rcu_mightsleep().

[ paulmck: Apply Joel Fernandes feedback. ]

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>
include/linux/rcupdate.h