lkml.org 
[lkml]   [2008]   [Apr]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 02/10] emm: notifier logic
On Fri, Apr 04, 2008 at 03:30:50PM -0700, Christoph Lameter wrote:
> + mm_lock(mm);
> + e->next = mm->emm_notifier;
> + /*
> + * The update to emm_notifier (e->next) must be visible
> + * before the pointer becomes visible.
> + * rcu_assign_pointer() does exactly what we need.
> + */
> + 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.

> + e = rcu_dereference(e->next);

Same here.


\
 
 \ /
  Last update: 2008-04-05 03:01    [W:0.301 / U:0.276 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site