Messages in this thread | | | Date | Wed, 3 Jan 2007 13:22:32 -0800 | From | Andrew Morton <> | Subject | Re: [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/
| |