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>
This commit is contained in:
Mathieu Desnoyers 2008-11-14 17:47:42 -05:00 коммит произвёл Ingo Molnar
Родитель 2504ea5edf
Коммит de0baf9ad6
1 изменённых файлов: 1 добавлений и 0 удалений

Просмотреть файл

@ -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);
}
/**