The patch titled
epoll: avoid kmemcheck warning
has been added to the -mm tree. Its filename is
epoll-avoid-kmemcheck-warning.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/SubmitChecklist when testing your code ***
See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this
The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/
------------------------------------------------------
Subject: epoll: avoid kmemcheck warning
From: Davide Libenzi <[EMAIL PROTECTED]>
Epoll calls rb_set_parent(n, n) to initialize the rb-tree node, but
rb_set_parent() accesses node's pointer in its code. This creates a
warning in kmemcheck (reported by Vegard Nossum) about an uninitialized
memory access. The warning is harmless since the following rb-tree node
insert is going to overwrite the node data. In any case I think it's
better to not have that happening at all, and fix it by properly
initializing the data.
Signed-off-by: Davide Libenzi <[EMAIL PROTECTED]>
Cc: Vegard Nossum <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
---
fs/eventpoll.c | 2 +-
include/linux/rbtree.h | 12 ++++++++++++
2 files changed, 13 insertions(+), 1 deletion(-)
diff -puN fs/eventpoll.c~epoll-avoid-kmemcheck-warning fs/eventpoll.c
--- a/fs/eventpoll.c~epoll-avoid-kmemcheck-warning
+++ a/fs/eventpoll.c
@@ -260,7 +260,7 @@ static inline int ep_cmp_ffd(struct epol
/* Special initialization for the RB tree node to detect linkage */
static inline void ep_rb_initnode(struct rb_node *n)
{
- rb_set_parent(n, n);
+ rb_init_node(n, n);
}
/* Removes a node from the RB tree and marks it for a fast is-linked check */
diff -puN include/linux/rbtree.h~epoll-avoid-kmemcheck-warning
include/linux/rbtree.h
--- a/include/linux/rbtree.h~epoll-avoid-kmemcheck-warning
+++ a/include/linux/rbtree.h
@@ -112,6 +112,18 @@ struct rb_root
struct rb_node *rb_node;
};
+/**
+ * rb_init_node - Initializes the node internal data
+ *
+ * @node: Pointer to the RB-Tree node
+ * @parent: Pointer to the parent node, or NULL
+ *
+ */
+static inline void rb_init_node(struct rb_node *node, struct rb_node *parent)
+{
+ node->rb_parent_color = (unsigned long) parent;
+ node->rb_left = node->rb_right = NULL;
+}
#define rb_parent(r) ((struct rb_node *)((r)->rb_parent_color & ~3))
#define rb_color(r) ((r)->rb_parent_color & 1)
_
Patches currently in -mm which might be from [EMAIL PROTECTED] are
origin.patch
epoll-avoid-kmemcheck-warning.patch
git-kvm.patch
-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html