From: Mathieu Desnoyers Date: Fri, 14 Nov 2008 22:47:42 +0000 (-0500) Subject: tracepoints: fix disable X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=de0baf9ad661ac630a45a50ea1717cc4f4b33ace;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.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 e96590f17de1..47a7303d6cd9 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); } /**