mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@us.ibm.com>
To: Andi Kleen <ak@suse.de>
Cc: Keith Owens <kaos@sgi.com>, Andrew Morton <akpm@osdl.org>,
	greg@kroah.com, sekharan@us.ibm.com,
	linux-kernel@vger.kernel.org, lse-tech@lists.sourceforge.net,
	Douglas_Warzecha@dell.com, Abhay_Salunke@dell.com,
	achim_leubner@adaptec.com, dmp@davidmpye.dyndns.org
Subject: Re: [Lse-tech] Re: [PATCH 0/7]: Fix for unsafe notifier chain
Date: Mon, 28 Nov 2005 11:55:03 -0800	[thread overview]
Message-ID: <20051128195503.GC11000@us.ibm.com> (raw)
In-Reply-To: <20051128120711.GP20775@brahms.suse.de>

On Mon, Nov 28, 2005 at 01:07:11PM +0100, Andi Kleen wrote:
> On Mon, Nov 28, 2005 at 07:31:36PM +1100, Keith Owens wrote:
> > On Mon, 28 Nov 2005 05:59:22 +0100, 
> > Andi Kleen <ak@suse.de> wrote:
> > >On Sun, Nov 27, 2005 at 08:57:45PM -0800, Andrew Morton wrote:
> > >> "Paul E. McKenney" <paulmck@us.ibm.com> wrote:
> > >> >
> > >> > Any options I missed?
> > >> 
> > >> Stop using the notifier chains from NMI context - it's too hard.  Use a
> > >> fixed-size array in the NMI code instead.
> > >
> > >Or just don't unregister. That is what I did for the debug notifiers.
> > 
> > Unregister is not the only problem.  Chain traversal races with
> > register as well.
> 
> Either it follows the old next or the new next. Both are valid.
> The only problem is that there isn't a write barrier between
> 
>  n->next = *list;
>  *list=n;
> 
> in notifier_chain_register, which might hit on non i386 architectures. 

Coding as follows:

	n->next = *list;
	rcu_assign_pointer(*list, n);

will provide memory barriers as needed, even if you are never removing
elements.

						Thanx, Paul

  reply	other threads:[~2005-11-28 19:55 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-23 23:37 Chandra Seetharaman
2005-11-27  4:07 ` Andrew Morton
2005-11-27 13:47   ` [Lse-tech] " Andi Kleen
2005-11-27 15:59     ` Keith Owens
2005-11-27 17:27       ` Andi Kleen
2005-11-27 17:39         ` Keith Owens
2005-11-27 19:56           ` Andrew Morton
2005-11-27 22:03             ` Greg KH
2005-11-28  2:43               ` Paul E. McKenney
2005-11-28  4:57                 ` Andrew Morton
2005-11-28  4:59                   ` Andi Kleen
2005-11-28  5:05                     ` Paul E. McKenney
2005-11-28  5:15                       ` Andi Kleen
2005-11-28  8:31                     ` Keith Owens
2005-11-28 12:07                       ` Andi Kleen
2005-11-28 19:55                         ` Paul E. McKenney [this message]
2005-12-04 16:19                       ` Alan Cox
2005-12-06 23:38                         ` Keith Owens
2005-12-07  2:43                           ` Keith Owens
2005-11-28  1:19             ` Keith Owens
2005-11-28 18:58   ` Chandra Seetharaman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20051128195503.GC11000@us.ibm.com \
    --to=paulmck@us.ibm.com \
    --cc=Abhay_Salunke@dell.com \
    --cc=Douglas_Warzecha@dell.com \
    --cc=achim_leubner@adaptec.com \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=dmp@davidmpye.dyndns.org \
    --cc=greg@kroah.com \
    --cc=kaos@sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lse-tech@lists.sourceforge.net \
    --cc=sekharan@us.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome