# Re: \[PATCH v10 04/14\] unwind\_user/deferred: Add unwind\_deferred\_trace()

- From: Peter Zijlstra \<peterz@infradead.org\>
- Date: 2025-06-18 14:02:59 
- List: linux-trace-kernel
- Page: https://ratatoskr.run/linux-trace-kernel/2025/06/3097484
- Thread: https://ratatoskr.run/linux-trace-kernel/2025/06/3086227/t.md

```text
On Tue, Jun 10, 2025 at 08:54:25PM -0400, Steven Rostedt wrote:
> +/**
> + * unwind_deferred_trace - Produce a user stacktrace in faultable context
> + * @trace: The descriptor that will store the user stacktrace
> + *
> + * This must be called in a known faultable context (usually when entering
> + * or exiting user space). Depending on the available implementations
> + * the @trace will be loaded with the addresses of the user space stacktrace
> + * if it can be found.

I am confused -- why would we ever want to call this on exiting
user-space, or rather kernel entry?

I thought the whole point was to request a user trace while in-kernel,
and defer that to return-to-user.
```
