public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: minyard@acm.org
Cc: Linux Kernel <linux-kernel@vger.kernel.org>,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	Carol Hebert <cah@us.ibm.com>,
	OpenIPMI Developers <openipmi-developer@lists.sourceforge.net>,
	Christoph Hellwig <hch@infradead.org>
Subject: Re: [PATCH] IPMI: Fix some RCU problems
Date: Wed, 3 Jan 2007 13:22:32 -0800	[thread overview]
Message-ID: <20070103132232.f924227e.akpm@osdl.org> (raw)
In-Reply-To: <20070103153130.GB16063@localdomain>

On Wed, 3 Jan 2007 09:31:30 -0600
Corey Minyard <minyard@acm.org> wrote:

>   found:
> +	smp_rmb();
>  	/* Note that each existing user holds a refcount to the interface. */
>  	kref_get(&intf->refcount);
>  
> @@ -2761,6 +2763,7 @@
>  		kref_put(&intf->refcount, intf_free);
>  	} else {
>  		/* After this point the interface is legal to use. */
> +		smp_wmb(); /* Keep memory order straight for RCU readers. */
>  		intf->intf_num = i;
>  		mutex_unlock(&ipmi_interfaces_mutex);
>  		call_smi_watchers(i, intf->si_dev);
> @@ -3924,6 +3927,8 @@
>  			/* Interface was not ready yet. */
>  			continue;
>  
> +		smp_rmb();
> +

It's nice to always have a comment explaining the use of open-coded
barriers.  Because often the reader is left wondered what on earth it's
barriering against what on earth else.


  reply	other threads:[~2007-01-03 21:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-03 15:31 [PATCH] IPMI: Fix some RCU problems Corey Minyard
2007-01-03 21:22 ` Andrew Morton [this message]
2007-01-04  3:34   ` [Openipmi-developer] " Corey Minyard
  -- strict thread matches above, loose matches on Subject: below --
2006-12-28 18:24 [PATCH] IPMI: fix " Corey Minyard
2006-12-28 18:31 ` Christoph Hellwig
2006-12-28 19:55   ` Paul E. McKenney
2006-12-28 20:24     ` Randy Dunlap
2006-12-28 22:23       ` Paul E. McKenney

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=20070103132232.f924227e.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=cah@us.ibm.com \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=minyard@acm.org \
    --cc=openipmi-developer@lists.sourceforge.net \
    --cc=paulmck@linux.vnet.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