The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: peterz@infradead.org, linux-kernel@vger.kernel.org, paulmck@us.ibm.com
Subject: Re: [patch] radix-tree: fix small lockless radix-tree bug
Date: Thu, 12 Jun 2008 12:34:43 -0700	[thread overview]
Message-ID: <20080612123443.e4682b3f.akpm@linux-foundation.org> (raw)
In-Reply-To: <200806130503.45369.nickpiggin@yahoo.com.au>

On Fri, 13 Jun 2008 05:03:45 +1000
Nick Piggin <nickpiggin@yahoo.com.au> wrote:

> @@ -124,6 +175,17 @@ static void radix_tree_node_rcu_free(str
>  {
>  	struct radix_tree_node *node =
>  			container_of(head, struct radix_tree_node, rcu_head);
> +
> +	/*
> +	 * must only free zeroed nodes into the slab. radix_tree_shrink
> +	 * can leave us with a non-NULL entry in the first slot, so clear
> +	 * that here to make sure.
> +	 */
> +	tag_clear(node, 0, 0);
> +	tag_clear(node, 1, 0);
> +	node->slots[0] = NULL;
> +	node->count = 0;
> +
>  	kmem_cache_free(radix_tree_node_cachep, node);
>  }

oic, that stuff got moved from the synchronous case into the RCU callback
case.

  parent reply	other threads:[~2008-06-12 19:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-12 19:03 [patch] radix-tree: fix small lockless radix-tree bug Nick Piggin
2008-06-12 19:15 ` Peter Zijlstra
2008-06-12 19:31 ` Andrew Morton
2008-06-12 19:38   ` Peter Zijlstra
2008-06-12 19:34 ` Andrew Morton [this message]
2008-06-12 19:47   ` Nick Piggin
2008-06-13  7:53 ` 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=20080612123443.e4682b3f.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nickpiggin@yahoo.com.au \
    --cc=paulmck@us.ibm.com \
    --cc=peterz@infradead.org \
    /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