oprofile: warn on freeing event buffer too early
authorRobert Richter <robert.richter@amd.com>
Fri, 9 Oct 2009 01:17:44 +0000 (03:17 +0200)
committerRobert Richter <robert.richter@amd.com>
Fri, 9 Oct 2009 19:32:05 +0000 (21:32 +0200)
A race shouldn't happen since all workqueues or handlers are canceled
or flushed before the event buffer is freed. A warning is triggered
now if the buffer is freed too early.

Also, this patch adds some comments about event buffer protection,
reworks some code and adds code to clear buffer_pos during alloc and
free of the event buffer.

Cc: David Rientjes <rientjes@google.com>
Cc: Stephane Eranian <eranian@google.com>
Signed-off-by: Robert Richter <robert.richter@amd.com>

No differences found