From: Mathieu Desnoyers Date: Fri, 14 Nov 2008 22:47:42 +0000 (-0500) Subject: tracepoints: fix disable X-Git-Tag: upstream/snapshot3+hdmi~18679^2~462^3~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=de0baf9ad661ac630a45a50ea1717cc4f4b33ace;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git tracepoints: fix disable Impact: fix race Set the probe array pointer to NULL when the tracepoint is disabled. The probe array point not being NULL could generate a race condition where the reader would dereference a freed pointer. Signed-off-by: Mathieu Desnoyers Signed-off-by: Ingo Molnar --- diff --git a/kernel/tracepoint.c b/kernel/tracepoint.c index e96590f..47a7303 100644 --- a/kernel/tracepoint.c +++ b/kernel/tracepoint.c @@ -262,6 +262,7 @@ static void set_tracepoint(struct tracepoint_entry **entry, static void disable_tracepoint(struct tracepoint *elem) { elem->state = 0; + rcu_assign_pointer(elem->funcs, NULL); } /**