# Re: \[PATCH v2\] task\_work: kasan: record task\_work\_add() call stack

- From: Jens Axboe \<axboe@kernel.dk\>
- Date: 2021-03-16 14:34:23 
- List: linux-mediatek
- Page: https://ratatoskr.run/linux-mediatek/2021/03/6303343
- Thread: https://ratatoskr.run/linux-mm/2021/03/6302625/t.md

```text
On 3/15/21 8:44 PM, Walter Wu wrote:
> Why record task_work_add() call stack?
> Syzbot reports many use-after-free issues for task_work, see [1].
> After see the free stack and the current auxiliary stack, we think
> they are useless, we don't know where register the work, this work
> may be the free call stack, so that we miss the root cause and
> don't solve the use-after-free.
> 
> Add task_work_add() call stack into KASAN auxiliary stack in
> order to improve KASAN report. It is useful for programmers
> to solve use-after-free issues.

I think this is a very useful addition, especially as task_work
proliferates.

Reviewed-by: Jens Axboe <axboe@kernel.dk>

-- 
Jens Axboe


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
```
