diff mbox series

[v2] rcu: kasan: record and print kvfree_call_rcu call stack

Message ID 20201120033451.29946-1-qiang.zhang@windriver.com (mailing list archive)
State New, archived
Headers show
Series [v2] rcu: kasan: record and print kvfree_call_rcu call stack | expand

Commit Message

Zhang, Qiang Nov. 20, 2020, 3:34 a.m. UTC
From: Zqiang <qiang.zhang@windriver.com>

Add kasan_record_aux_stack function for kvfree_call_rcu function to
record call stacks.

Cc: Walter Wu <walter-zh.wu@mediatek.com>
Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: "Paul E. McKenney" <paulmck@kernel.org>
Signed-off-by: Zqiang <qiang.zhang@windriver.com>
 Add Cc tags.

 kernel/rcu/tree.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series


diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index da3414522285..a252b2f0208d 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -3506,7 +3506,7 @@  void kvfree_call_rcu(struct rcu_head *head, rcu_callback_t func)
 		success = true;
 		goto unlock_return;
+	kasan_record_aux_stack(ptr);
 	success = kvfree_call_rcu_add_ptr_to_bulk(krcp, ptr);
 	if (!success) {