lkml.org 
[lkml]   [2007]   [Jan]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] IPMI: Fix some RCU problems
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.

-
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/

\
 
 \ /
  Last update: 2007-01-03 22:25    [W:0.121 / U:0.268 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site