diff options
author | Carl Love <cel@us.ibm.com> | 2008-08-11 17:25:43 +1000 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2008-08-26 10:24:46 +1000 |
commit | f4156d1cd1dc260cca767a6c0636625f05446799 (patch) | |
tree | f0802db39246d371908a43dc992823feb82fecd8 /drivers/oprofile/event_buffer.c | |
parent | 2bb2e1db906e6e139636271d2cf46466d9e84005 (diff) | |
download | linux-f4156d1cd1dc260cca767a6c0636625f05446799.tar.gz linux-f4156d1cd1dc260cca767a6c0636625f05446799.tar.bz2 linux-f4156d1cd1dc260cca767a6c0636625f05446799.zip |
powerpc/cell/oprofile: Avoid double vfree of profile buffer
If an error occurs on opcontrol start, the event and per cpu buffers
are released. If later opcontrol shutdown is called then the free
function will be called again to free buffers that no longer
exist. This results in a kernel oops. The following changes
prevent the call to delete buffers that don't exist.
Signed-off-by: Carl Love <carll@us.ibm.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Robert Richter <robert.richter@amd.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'drivers/oprofile/event_buffer.c')
-rw-r--r-- | drivers/oprofile/event_buffer.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/oprofile/event_buffer.c b/drivers/oprofile/event_buffer.c index e7fbac529935..8d692a5c8e73 100644 --- a/drivers/oprofile/event_buffer.c +++ b/drivers/oprofile/event_buffer.c @@ -93,6 +93,8 @@ out: void free_event_buffer(void) { vfree(event_buffer); + + event_buffer = NULL; } |