Re: [PATCH 3/4] gcov: add gcov profiling infrastructure

Li Wei
2009-02-26T02:41:19Z

node->parent is always NULL, causing NULL-pointer dereference in
remove_node.

Could you please include something like this?

---
kernel/gcov/fs.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/kernel/gcov/fs.c b/kernel/gcov/fs.c
index 0084492..6675c82 100644
--- a/kernel/gcov/fs.c
+++ b/kernel/gcov/fs.c
@@ -374,6 +374,7 @@ static struct gcov_node *new_node(struct gcov_node *parent,
return NULL;
}
init_node(node, info, name);
+ node->parent = parent;
/* Differentiate between gcov data file nodes and directory nodes. */
if (info) {
node->dentry = debugfs_create_file(deskew(node->name), 0600,
--
1.5.6.3