Re: [PATCH v4 30/39] unwind_user/deferred: Make unwind deferral requests NMI-safe
From: Peter Zijlstra
Date: Thu Jan 23 2025 - 17:21:28 EST
On Thu, Jan 23, 2025 at 11:48:07AM -0800, Josh Poimboeuf wrote:
> > > > cookie = READ_ONCE(current->unwind_info.cookie);
> > > > do {
> > > > if (cookie)
> > > > return cookie;
> > > > cookie = ctx_to_cookie(cpu, ctr+1);
> > > > } while (!try_cmpxchg64(¤t->unwind_info.cookie, &cookie, cookie));
>
> Should not the 2nd argument be &zero?
This I suppose
cookie = READ_ONCE(current->unwind_info.cookie);
do {
if (cookie)
return cookie;
} while (!try_cmpxchg64(¤t->unwind_info.cookie, &cookie,
ctx_to_cookie(cpu, ctr+1)));