public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Nick Piggin <nickpiggin@yahoo.com.au>
To: Jonathan Corbet <corbet@lwn.net>
Cc: linux-kernel@vger.kernel.org, Andrew Morton <akpm@osdl.org>
Subject: Re: RFC: radix tree safety
Date: Tue, 14 Mar 2006 09:55:58 +1100	[thread overview]
Message-ID: <4415F87E.806@yahoo.com.au> (raw)
In-Reply-To: <20060313224344.9173.qmail@lwn.net>

Jonathan Corbet wrote:

>I've been digging through the radix tree code, and I noticed that the
>tag functions have an interesting limitation.  The tag is given as an
>integer value, but, in reality, the only values that work are zero and
>one.  Anything else will return random results or (when setting tags)
>corrupt unrelated memory.
>
>The number of radix tree users is small, so it's not hard to confirm
>that all tag values currently in use are legal.  But the interface would
>seem to invite mistakes.
>
>The following patch puts in checks for out-of-range tag values.  I've
>elected to have the relevant call fail; one could argue that it should
>BUG instead.  Either seems better than silently doing weird stuff.  Not
>2.6.16 material, obviously, but maybe suitable thereafter.
>
>

I'd agree if you make them BUG_ON()s.

Andrew Morton's kind of the radix-tree tags guy though... Andrew?

Nick

Send instant messages to your online friends http://au.messenger.yahoo.com 

  reply	other threads:[~2006-03-13 22:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-13 22:43 RFC: radix tree safety Jonathan Corbet
2006-03-13 22:55 ` Nick Piggin [this message]
2006-03-13 23:50   ` Andrew Morton
2006-03-14  0:01     ` Jonathan Corbet
2006-03-14  0:14       ` Andrew Morton
2006-03-14  5:24         ` Nick Piggin
2006-03-16 17:13           ` Jonathan Corbet
2006-03-17  0:41             ` Nick Piggin
2006-03-13 23:03 ` Randy.Dunlap

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=4415F87E.806@yahoo.com.au \
    --to=nickpiggin@yahoo.com.au \
    --cc=akpm@osdl.org \
    --cc=corbet@lwn.net \
    --cc=linux-kernel@vger.kernel.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