From: Christoph Hellwig <hch@infradead.org>
To: Corey Minyard <minyard@acm.org>
Cc: Andrew Morton <akpm@osdl.org>,
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>
Subject: Re: [PATCH] IPMI: fix some RCU problems
Date: Thu, 28 Dec 2006 18:31:01 +0000 [thread overview]
Message-ID: <20061228183101.GA2412@infradead.org> (raw)
In-Reply-To: <20061228182447.GA23730@localdomain>
> + if (list_empty(&intf->cmd_rcvrs))
> + INIT_LIST_HEAD(&list);
> + else {
> + list.next = intf->cmd_rcvrs.next;
> + list.prev = intf->cmd_rcvrs.prev;
> + INIT_LIST_HEAD(&intf->cmd_rcvrs);
> +
> + /*
> + * At this point the list body still points to
> + * intf->cmd_rcvrs. Wait for any readers to finish
> + * using the list before we switch the list body over
> + * to the new list.
> + */
> + synchronize_rcu();
> +
> + /* Ready the list for use. */
> + list.next->prev = &list;
> + list.prev->next = &list;
> + }
This kind of thing must not be opencoded in drivers. Please add
a new list_splice_rcu helper to list.h
next prev parent reply other threads:[~2006-12-28 18:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-28 18:24 [PATCH] IPMI: fix some RCU problems Corey Minyard
2006-12-28 18:31 ` Christoph Hellwig [this message]
2006-12-28 19:55 ` Paul E. McKenney
2006-12-28 20:24 ` Randy Dunlap
2006-12-28 22:23 ` Paul E. McKenney
-- strict thread matches above, loose matches on Subject: below --
2007-01-03 15:31 [PATCH] IPMI: Fix " Corey Minyard
2007-01-03 21:22 ` Andrew Morton
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=20061228183101.GA2412@infradead.org \
--to=hch@infradead.org \
--cc=akpm@osdl.org \
--cc=cah@us.ibm.com \
--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