lkml.org 
[lkml]   [2008]   [Apr]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 02/10] emm: notifier logic
On Sat, 5 Apr 2008, Andrea Arcangeli wrote:

> > + rcu_assign_pointer(mm->emm_notifier, e);
> > + mm_unlock(mm);
>
> My mm_lock solution makes all rcu serialization an unnecessary
> overhead so you should remove it like I already did in #v11. If it
> wasn't the case, then mm_lock wouldn't be a definitive fix for the
> race.

There still could be junk in the cache of one cpu. If you just read the
new pointer but use the earlier content pointed to then you have a
problem.

So a memory fence / barrier is needed to guarantee that the contents
pointed to are fetched after the pointer.



\
 
 \ /
  Last update: 2008-04-07 07:51    [W:1.000 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site