Skip to content

Commit 64d1d06

Browse files
urezkipaulmckrcu
authored andcommitted
rcu/tiny: support vmalloc in tiny-RCU
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) <[email protected]> Signed-off-by: Uladzislau Rezki (Sony) <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]>
1 parent 5f3c8d6 commit 64d1d06

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

kernel/rcu/tiny.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include <linux/cpu.h>
2424
#include <linux/prefetch.h>
2525
#include <linux/slab.h>
26+
#include <linux/mm.h>
2627

2728
#include "rcu.h"
2829

@@ -86,7 +87,7 @@ static inline bool rcu_reclaim_tiny(struct rcu_head *head)
8687
rcu_lock_acquire(&rcu_callback_map);
8788
if (__is_kfree_rcu_offset(offset)) {
8889
trace_rcu_invoke_kfree_callback("", head, offset);
89-
kfree((void *)head - offset);
90+
kvfree((void *)head - offset);
9091
rcu_lock_release(&rcu_callback_map);
9192
return true;
9293
}

0 commit comments

Comments
 (0)