lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120718113135.GB32698@google.com>
Date:	Wed, 18 Jul 2012 04:31:35 -0700
From:	Michel Lespinasse <walken@...gle.com>
To:	aarcange@...hat.com, dwmw2@...radead.org, riel@...hat.com,
	peterz@...radead.org, daniel.santos@...ox.com, axboe@...nel.dk,
	ebiederm@...ssion.com, akpm@...ux-foundation.org
Cc:	linux-mm@...ck.org, linux-kernel@...r.kernel.org,
	torvalds@...ux-foundation.org
Subject: [PATCH] rbtree: fix jffs2 build issue due to renamed
 __rb_parent_color field

When renaming rb_parent_color into __rb_parent_color to highlight the
fact that people aren't expected to directly manipulate this, I broke
the jffs2 build which was doing such direct manipulation in
fs/jffs2/readinode.c . Fix this and add a comment explaining why
this direct use is safe here.

Signed-off-by: Michel Lespinasse <walken@...gle.com>
---
 fs/jffs2/readinode.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/fs/jffs2/readinode.c b/fs/jffs2/readinode.c
index dc0437e..b00fc50 100644
--- a/fs/jffs2/readinode.c
+++ b/fs/jffs2/readinode.c
@@ -395,7 +395,9 @@ static int jffs2_add_tn_to_tree(struct jffs2_sb_info *c,
 
 /* Trivial function to remove the last node in the tree. Which by definition
    has no right-hand -- so can be removed just by making its only child (if
-   any) take its place under its parent. */
+   any) take its place under its parent. Note that we don't maintain the
+   usual rbtree invariants as there won't be further insert or erase
+   operations on the tree.*/
 static void eat_last(struct rb_root *root, struct rb_node *node)
 {
 	struct rb_node *parent = rb_parent(node);
@@ -414,7 +416,7 @@ static void eat_last(struct rb_root *root, struct rb_node *node)
 	*link = node->rb_left;
 	/* Colour doesn't matter now. Only the parent pointer. */
 	if (node->rb_left)
-		node->rb_left->rb_parent_color = node->rb_parent_color;
+		node->rb_left->__rb_parent_color = node->__rb_parent_color;
 }
 
 /* We put this in reverse order, so we can just use eat_last */
-- 
1.7.7.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ