public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@us.ibm.com>
To: Urs Thuermann <urs@isnogud.escape.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] RCU Documentation
Date: Tue, 4 Jul 2006 23:12:40 -0700	[thread overview]
Message-ID: <20060705061240.GC19776@us.ibm.com> (raw)
In-Reply-To: <m2sllh8kep.fsf@janus.isnogud.escape.de>

On Tue, Jul 04, 2006 at 05:22:22PM +0200, Urs Thuermann wrote:
> Updater should use _rcu variant of list_del().
> 
> urs

Good catch!!!

Acked-by: Paul E. McKenney <paulmck@us.ibm.com>
> Signed-off-by: Urs Thuermann <urs@isnogud.escape.de>
> 
> --- linux-2.6.17/Documentation/RCU/whatisRCU.txt.orig
> +++ linux-2.6.17/Documentation/RCU/whatisRCU.txt
> @@ -677,8 +677,9 @@
>  	+	spin_lock(&listmutex);
>  		list_for_each_entry(p, head, lp) {
>  			if (p->key == key) {
> -				list_del(&p->list);
> +	-			list_del(&p->list);
>  	-			write_unlock(&listmutex);
> +	+			list_del_rcu(&p->list);
>  	+			spin_unlock(&listmutex);
>  	+			synchronize_rcu();
>  				kfree(p);
> @@ -726,7 +727,7 @@
>   5   write_lock(&listmutex);            5   spin_lock(&listmutex);
>   6   list_for_each_entry(p, head, lp) { 6   list_for_each_entry(p, head, lp) {
>   7     if (p->key == key) {             7     if (p->key == key) {
> - 8       list_del(&p->list);            8       list_del(&p->list);
> + 8       list_del(&p->list);            8       list_del_rcu(&p->list);
>   9       write_unlock(&listmutex);      9       spin_unlock(&listmutex);
>                                         10       synchronize_rcu();
>  10       kfree(p);                     11       kfree(p);
> -
> 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/
> 

      reply	other threads:[~2006-07-05  6:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-04 15:22 [PATCH] RCU Documentation Urs Thuermann
2006-07-05  6:12 ` Paul E. McKenney [this message]

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=20060705061240.GC19776@us.ibm.com \
    --to=paulmck@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=urs@isnogud.escape.de \
    /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