diff options
author | Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> | 2008-11-14 23:47:42 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-11-16 09:01:31 +0100 |
commit | de0baf9ad661ac630a45a50ea1717cc4f4b33ace (patch) | |
tree | 71c95e555b053f1e03f0befaa457d312e23dc919 /kernel/tracepoint.c | |
parent | tracepoints: samples, fix teardown (diff) | |
download | linux-de0baf9ad661ac630a45a50ea1717cc4f4b33ace.tar.xz linux-de0baf9ad661ac630a45a50ea1717cc4f4b33ace.zip |
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 <mathieu.desnoyers@polymtl.ca>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/tracepoint.c')
-rw-r--r-- | kernel/tracepoint.c | 1 |
1 files changed, 1 insertions, 0 deletions
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); } /** |