# Re: \[PATCH v13 07/14\] unwind\_user/deferred: Make unwind deferral requests NMI-safe

- From: Steven Rostedt \<rostedt@goodmis.org\>
- Date: 2025-07-14 14:19:22 
- List: linux-trace-kernel
- Page: https://ratatoskr.run/linux-trace-kernel/2025/07/3133749
- Thread: https://ratatoskr.run/linux-trace-kernel/2025/07/3124621/t.md

```text
On Mon, 14 Jul 2025 15:29:36 +0200
Peter Zijlstra [ref] wrote:

> +#ifdef CONFIG_ARCH_HAVE_NMI_SAFE_CMPXCHG
> +#define UNWIND_NMI_SAFE 1
> +static inline bool try_assign_cnt(struct unwind_task_info *info, u32 cnt)
> +{
> +	u32 zero = 0;
> +	return try_cmpxchg(&info->id.cnt, &zero, cnt);
> +}
> +static inline bool test_and_set_pending(struct unwind_task_info *info)
> +{
> +	return info->pending || cmpxchg_local(&info->pending, 0, 1);
> +}
> +#el

Patch 10 moves the pending bit into the unwind_mask as it needs to be
in sync with the different tracer requests. I'm not sure how this
change will interact with that.

-- Steve
```
