lkml.org 
[lkml]   [2019]   [Jul]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] perf: Fix race between close() and fork()
On Fri, Jun 28, 2019 at 10:46:08PM +0200, Peter Zijlstra wrote:
> On Fri, Jun 28, 2019 at 05:50:03PM +0100, Mark Rutland wrote:
> > > + /*
> > > + * Wake any perf_event_free_task() waiting for this event to be
> > > + * freed.
> > > + */
> > > + smp_mb(); /* pairs with wait_var_event() */
> > > + wake_up_var(var);
> >
> > Huh, so wake_up_var() doesn't imply a RELEASE?
> >
> > As an aside, doesn't that mean all callers of wake_up_var() have to do
> > likewise to ensure it isn't re-ordered with whatever prior stuff they're
> > trying to notify waiters about? Several do an smp_store_release() then a
> > wake_up_var(), but IIUC the wake_up_var() could get pulled before that
> > release...
>
> Yah,...
>
> https://lkml.kernel.org/r/20190624165012.GH3436@hirez.programming.kicks-ass.net

That gets me a 404, so I'll assume that's a speculative store. ;)

> I needs to get back to that.

Ouch; sorry for reminding you of this mess!

Thanks,
Mark.

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