[patch 3/4] markers call_rcu usage: initialize rcu_head structures

From: Mathieu Desnoyers
Date: Tue Oct 06 2009 - 10:42:54 EST


Initialize rcu_head structures before passing them to call_rcu() to eliminate
false positives in DEBUG_RCU_HEAD.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@xxxxxxxxxx>
CC: "Paul E. McKenney" <paulmck@xxxxxxxxxxxxxxxxxx>
CC: mingo@xxxxxxx
CC: akpm@xxxxxxxxxxxxxxxxxxxx
---
kernel/marker.c | 1 +
1 file changed, 1 insertion(+)

Index: linux-2.6-lttng/kernel/marker.c
===================================================================
--- linux-2.6-lttng.orig/kernel/marker.c 2009-10-06 09:16:32.000000000 -0400
+++ linux-2.6-lttng/kernel/marker.c 2009-10-06 09:22:07.000000000 -0400
@@ -451,6 +451,7 @@ static struct marker_entry *add_marker(c
e->format_allocated = 0;
e->refcount = 0;
e->rcu_pending = 0;
+ INIT_RCU_HEAD(&e->rcu);
hlist_add_head(&e->hlist, head);
return e;
}

--
Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/