* [PATCH] fix oprofile timer race
@ 2003-03-13 11:32 John Levon
0 siblings, 0 replies; only message in thread
From: John Levon @ 2003-03-13 11:32 UTC (permalink / raw)
To: linux-kernel, torvalds
wli got an oops from this. The callbacks call mod_timer so the timer had
better be setup by then
please apply
john
--- linux/drivers/oprofile/buffer_sync.c 2003-03-06 16:20:31.000000000 +0000
+++ linux-cvs/drivers/oprofile/buffer_sync.c 2003-03-12 15:24:33.000000000 +0000
@@ -82,9 +82,16 @@
int sync_start(void)
{
- int err = profile_event_register(EXIT_TASK, &exit_task_nb);
+ int err;
+
+ init_timer(&sync_timer);
+ sync_timer.function = timer_ping;
+ sync_timer.expires = jiffies + DEFAULT_EXPIRE;
+ add_timer(&sync_timer);
+
+ err = profile_event_register(EXIT_TASK, &exit_task_nb);
if (err)
- goto out;
+ goto out1;
err = profile_event_register(EXIT_MMAP, &exit_mmap_nb);
if (err)
goto out2;
@@ -92,16 +99,14 @@
if (err)
goto out3;
- init_timer(&sync_timer);
- sync_timer.function = timer_ping;
- sync_timer.expires = jiffies + DEFAULT_EXPIRE;
- add_timer(&sync_timer);
out:
return err;
out3:
profile_event_unregister(EXIT_MMAP, &exit_mmap_nb);
out2:
profile_event_unregister(EXIT_TASK, &exit_task_nb);
+out1:
+ del_timer_sync(&sync_timer);
goto out;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-03-13 11:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-13 11:32 [PATCH] fix oprofile timer race John Levon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®