From: Jens Axboe <jens.axboe@oracle.com>
To: Steve Wise <swise@opengridcomputing.com>
Cc: balbir@linux.vnet.ibm.com,
Andrew Morton <akpm@linux-foundation.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Wolfram Strepp <wstrepp@gmx.de>
Subject: Re: [BUG] rbtree bug with mmotm 2009-04-14-17-24
Date: Thu, 23 Apr 2009 07:34:02 +0200 [thread overview]
Message-ID: <20090423053402.GH4593@kernel.dk> (raw)
In-Reply-To: <49EF7F3A.1070809@opengridcomputing.com>
On Wed, Apr 22 2009, Steve Wise wrote:
> Steve Wise wrote:
>> Jens Axboe wrote:
>>
>>
>>
>>>> Still crashes with this variant:
>>>>
>>>
>>> OK, so please try and revert a36e71f996e25d6213f57951f7ae1874086ec57e
>>> and see if that works?
>>>
>>> Or, better yet, please try and revert
>>> 55a63998b8967615a15e2211ba0ff3a84a565824 first. If that doesn't work,
>>> try the above revert.
>>>
>>>
>>
>> Reverting 55a63998b8967615a15e2211ba0ff3a84a565824 did the trick.
>>
>>
>> Steve.
>>
>>
>
> <snipit from 55a63998b8967615a15e2211ba0ff3a84a565824>
>
> @@ -200,17 +197,14 @@ static void __rb_erase_color(struct rb_node *node,
> struct rb_node *parent,
> {
> if (!other->rb_left ||
> rb_is_black(other->rb_left))
> {
> - register struct rb_node *o_right;
> - if ((o_right = other->rb_right))
> - rb_set_black(o_right);
> + rb_set_black(other->rb_right);
> rb_set_red(other);
> __rb_rotate_left(other, root);
> other = parent->rb_left;
> }
> rb_set_color(other, rb_color(parent));
> rb_set_black(parent);
> - if (other->rb_left)
> - rb_set_black(other->rb_left);
> + rb_set_black(other->rb_left);
> __rb_rotate_right(parent, root);
> node = root->rb_node;
> break;
>
>
> I don't know this code, but isn't the 'if (other->rb_left)' really
> needed? Or is it always true that if '!other->rb_left' is true entering
> this snipit, then after executing the first 'if' block, then
> 'other->rb_left' must be a valid ptr? (how's that for confusing english?
> :)
Heh, not sure. What is sure is that the commit in question is
problematic. Either because it itself has a bug, or because it exposes a
bug elsewhere in the rbtree code. So I'd suggest we just revert that
commit ASAP.
--
Jens Axboe
next prev parent reply other threads:[~2009-04-23 5:34 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-21 18:42 [BUG] rbtree bug with mmotm 2009-04-14-17-24 Balbir Singh
2009-04-21 22:03 ` Steve Wise
2009-04-22 13:17 ` Jens Axboe
2009-04-22 14:24 ` Steve Wise
2009-04-22 14:27 ` Steve Wise
2009-04-22 14:39 ` Steve Wise
2009-04-22 16:30 ` Jens Axboe
2009-04-22 16:37 ` Jens Axboe
2009-04-22 18:17 ` Steve Wise
2009-04-22 18:34 ` Jens Axboe
2009-04-22 18:59 ` Steve Wise
2009-04-22 19:22 ` Jens Axboe
2009-04-22 20:17 ` Steve Wise
2009-04-22 20:34 ` Steve Wise
2009-04-23 5:34 ` Jens Axboe [this message]
2009-04-23 10:40 ` Jens Axboe
2009-04-23 21:24 ` Steve Wise
2009-04-24 5:28 ` Balbir Singh
2009-04-22 13:16 ` Jens Axboe
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=20090423053402.GH4593@kernel.dk \
--to=jens.axboe@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=balbir@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=swise@opengridcomputing.com \
--cc=wstrepp@gmx.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