lkml.org 
[lkml]   [2019]   [Nov]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 09/12] futex: Provide state handling for exec() as well
On Thu, 7 Nov 2019, Peter Zijlstra wrote:
> On Wed, Nov 06, 2019 at 10:55:43PM +0100, Thomas Gleixner wrote:
>
> > +static void futex_cleanup_end(struct task_struct *tsk, int state)
> > +{
> > + /*
> > + * Lockless store. The only side effect is that an observer might
> > + * take another loop until it becomes visible.
> > + */
> > + tsk->futex_state = state;
>
> As I mentioned yesterday, paranoia would've made me write this as
> smp_store_release(), also to avoid it creaping back into the locked
> region.
>
> That is, the comment above deals with it being visible late, but it
> could be visible early.
>
> At the same time, if this is a release, what does it pair with. The
> obvious place would be the load in handle_exit_race() but that didn't
> want to make sense last night -- and I'm not sure it wants to make more
> sense today.

Right. I couldn't come up with any sensible argument either.

Thanks,

tglx

\
 
 \ /
  Last update: 2019-11-07 10:55    [W:0.144 / U:1.352 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site