Re: [PATCH v2] task_work: kasan: record task_work_add() call stack

From
Oleg Nesterov <oleg@redhat.com>
Date
2021-03-16 17:55:53
Also in
linux-arm-kernel, linux-mm, lkml
Reply to
Walter Wu, 2021-03-16
On 03/16, Walter Wu wrote:
quoted hunk ↗ jump to hunk
--- a/kernel/task_work.c
+++ b/kernel/task_work.c
@@ -34,6 +34,9 @@ int task_work_add(struct task_struct *task, struct callback_head *work,
 {
 	struct callback_head *head;

+	/* record the work call stack in order to print it in KASAN reports */
+	kasan_record_aux_stack(work);
+
 	do {
 		head = READ_ONCE(task->task_works);
 		if (unlikely(head == &work_exited))
Acked-by: Oleg Nesterov <oleg@redhat.com>


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
Thread (5 messages) 5 messages, 5 authors, last reply 2021-03-18
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help