]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
rcu/tiny: support vmalloc in tiny-RCU
authorUladzislau Rezki (Sony) <urezki@gmail.com>
Mon, 25 May 2020 21:47:54 +0000 (23:47 +0200)
committerPaul E. McKenney <paulmck@kernel.org>
Mon, 29 Jun 2020 18:59:25 +0000 (11:59 -0700)
Replace kfree() with kvfree() in rcu_reclaim_tiny().
This makes it possible to release either SLAB or vmalloc
objects after a GP.

Reviewed-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>
kernel/rcu/tiny.c

index dd572ce7c7479caaa2a957dbb0a3fc65f4be386a..4b99f7b88beec52ffc07fa80a5ee42c7c4c104f0 100644 (file)
@@ -23,6 +23,7 @@
 #include <linux/cpu.h>
 #include <linux/prefetch.h>
 #include <linux/slab.h>
+#include <linux/mm.h>
 
 #include "rcu.h"
 
@@ -86,7 +87,7 @@ static inline bool rcu_reclaim_tiny(struct rcu_head *head)
        rcu_lock_acquire(&rcu_callback_map);
        if (__is_kfree_rcu_offset(offset)) {
                trace_rcu_invoke_kfree_callback("", head, offset);
-               kfree((void *)head - offset);
+               kvfree((void *)head - offset);
                rcu_lock_release(&rcu_callback_map);
                return true;
        }