login
Login
/
Register
Search
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
April
»
1
Re: [patch 1/9] EMM Notifier: The notifier calls
view
thread
!MAILaRCHIVE_VOTE_RePLACE
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From:
Paul E. McKenney <paulmck@...>
To: Peter Zijlstra <a.p.zijlstra@...>
Cc: Christoph Lameter <clameter@...>, Hugh Dickins <hugh@...>, Andrea Arcangeli <andrea@...>, linux-kernel <linux-kernel@...>
Subject:
Re: [patch 1/9] EMM Notifier: The notifier calls
Date: Tuesday, April 1, 2008 - 5:38 pm
On Tue, Apr 01, 2008 at 11:14:40PM +0200, Peter Zijlstra wrote:
quoted text
> (Christoph, why are your CCs so often messed up?) > > On Tue, 2008-04-01 at 13:55 -0700, Christoph Lameter wrote: > > plain text document attachment (emm_notifier) > > > +/* Register a notifier */ > > +void emm_notifier_register(struct emm_notifier *e, struct mm_struct *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); > > +} > > +EXPORT_SYMBOL_GPL(emm_notifier_register); > > + > > +/* Perform a callback */ > > +int __emm_notify(struct mm_struct *mm, enum emm_operation op, > > + unsigned long start, unsigned long end) > > +{ > > + struct emm_notifier *e = rcu_dereference(mm)->emm_notifier; > > + int x; > > + > > + while (e) { > > + > > + if (e->callback) { > > + x = e->callback(e, mm, op, start, end); > > + if (x) > > + return x; > > + } > > + /* > > + * emm_notifier contents (e) must be fetched after > > + * the retrival of the pointer to the notifier. > > + */ > > + e = rcu_dereference(e)->next; > > + } > > + return 0; > > +} > > +EXPORT_SYMBOL_GPL(__emm_notify); > > +#endif > > Those rcu_dereference()s are wrong. They should read: > > e = rcu_dereference(mm->emm_notifier); > > and > > e = rcu_dereference(e->next);
Peter has it right. You need to rcu_dereference() the same thing that you rcu_assign_pointer() to. Thanx, Paul --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[patch 1/9] EMM Notifier: The notifier calls
, Christoph Lameter
, (Tue Apr 1, 4:55 pm)
Re: [patch 1/9] EMM Notifier: The notifier calls
, Andrea Arcangeli
, (Wed Apr 2, 2:49 am)
Re: [patch 1/9] EMM Notifier: The notifier calls
, Christoph Lameter
, (Wed Apr 2, 1:59 pm)
Re: [patch 1/9] EMM Notifier: The notifier calls
, Andrea Arcangeli
, (Wed Apr 2, 5:53 pm)
Re: [patch 1/9] EMM Notifier: The notifier calls
, Christoph Lameter
, (Wed Apr 2, 5:54 pm)
Re: [patch 1/9] EMM Notifier: The notifier calls
, Andrea Arcangeli
, (Wed Apr 2, 6:09 pm)
Re: [patch 1/9] EMM Notifier: The notifier calls
, Christoph Lameter
, (Wed Apr 2, 7:04 pm)
EMM: Require single threadedness for registration.
, Christoph Lameter
, (Wed Apr 2, 5:05 pm)
Re: EMM: Require single threadedness for registration.
, Andrea Arcangeli
, (Wed Apr 2, 6:01 pm)
Re: EMM: Require single threadedness for registration.
, Christoph Lameter
, (Wed Apr 2, 6:06 pm)
Re: EMM: Require single threadedness for registration.
, Andrea Arcangeli
, (Wed Apr 2, 6:17 pm)
EMM: disable other notifiers before register and unregister
, Christoph Lameter
, (Wed Apr 2, 9:24 pm)
Re: EMM: disable other notifiers before register and unregis...
, Andrea Arcangeli
, (Thu Apr 3, 11:29 am)
Re: EMM: disable other notifiers before register and unregis...
, Christoph Lameter
, (Thu Apr 3, 3:20 pm)
[PATCH] mmu notifier #v11
, Andrea Arcangeli
, (Fri Apr 4, 4:20 pm)
Re: [PATCH] mmu notifier #v11
, Christoph Lameter
, (Fri Apr 4, 6:06 pm)
Re: [PATCH] mmu notifier #v11
, Andrea Arcangeli
, (Fri Apr 4, 8:23 pm)
Re: [PATCH] mmu notifier #v11
, Christoph Lameter
, (Mon Apr 7, 1:45 am)
Re: [PATCH] mmu notifier #v11
, Andrea Arcangeli
, (Mon Apr 7, 2:02 am)
Re: EMM: disable other notifiers before register and unregis...
, Andrea Arcangeli
, (Fri Apr 4, 8:30 am)
Re: EMM: disable other notifiers before register and unregis...
, Christoph Lameter
, (Thu Apr 3, 4:23 pm)
Re: EMM: disable other notifiers before register and unregis...
, Peter Zijlstra
, (Thu Apr 3, 6:40 am)
Re: EMM: Require single threadedness for registration.
, Christoph Lameter
, (Wed Apr 2, 6:41 pm)
EMM: Fixup return value handling of emm_notify()
, Christoph Lameter
, (Wed Apr 2, 3:03 pm)
Re: EMM: Fixup return value handling of emm_notify()
, Andrea Arcangeli
, (Wed Apr 2, 5:25 pm)
Re: EMM: Fixup return value handling of emm_notify()
, Christoph Lameter
, (Wed Apr 2, 5:33 pm)
Re: EMM: Fixup return value handling of emm_notify()
, Peter Zijlstra
, (Thu Apr 3, 6:40 am)
Re: EMM: Fixup return value handling of emm_notify()
, Christoph Lameter
, (Thu Apr 3, 3:14 pm)
Re: EMM: Fixup return value handling of emm_notify()
, Andrea Arcangeli
, (Thu Apr 3, 11:00 am)
Re: [patch 1/9] EMM Notifier: The notifier calls
, Robin Holt
, (Wed Apr 2, 6:59 am)
Re: [patch 1/9] EMM Notifier: The notifier calls
, Andrea Arcangeli
, (Wed Apr 2, 7:16 am)
Re: [patch 1/9] EMM Notifier: The notifier calls
, Robin Holt
, (Wed Apr 2, 10:26 am)
Re: [patch 1/9] EMM Notifier: The notifier calls
, Peter Zijlstra
, (Tue Apr 1, 5:14 pm)
Re: [patch 1/9] EMM Notifier: The notifier calls
, Paul E. McKenney
, (Tue Apr 1, 5:38 pm)
EMM: Fix rcu handling and spelling
, Christoph Lameter
, (Wed Apr 2, 2:43 pm)
Re: EMM: Fix rcu handling and spelling
, Paul E. McKenney
, (Wed Apr 2, 3:02 pm)
Re: [patch 1/9] EMM Notifier: The notifier calls
, Christoph Lameter
, (Wed Apr 2, 1:44 pm)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Greg KH
[RFC] sample kobject implementation
Greg Kroah-Hartman
[PATCH 001/196] Chinese: Add the known_regression URI to the HOWTO
Paul E. McKenney
[PATCH RFC 2/9] RCU: Fix barriers
Joe Perches
[PATCH 011/148] include/asm-x86/bug.h: checkpatch cleanups - formatting only
git
:
linux-netdev
:
Jarek Poplawski
[PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
Gerrit Renker
[PATCH 15/37] dccp: Set per-connection CCIDs via socket options
Linus Torvalds
Re: [GIT]: Networking
Jeff Garzik
Re: [PATCH] drivers/net: remove network drivers' last few uses of IRQF_SAMPLE_RANDOM
openbsd-misc
:
Colocation donated by:
Who's online
There are currently
2 users
and
594 guests
online.
Online users
jamiieyg97h
jdoming
Syndicate