From: John Levon <levon@movementarian.org>
To: linux-kernel@vger.kernel.org, torvalds@transmeta.com
Subject: [PATCH] fix oprofile timer race
Date: Thu, 13 Mar 2003 11:32:23 +0000 [thread overview]
Message-ID: <20030313113223.GA48379@compsoc.man.ac.uk> (raw)
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;
}
reply other threads:[~2003-03-13 11:21 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030313113223.GA48379@compsoc.man.ac.uk \
--to=levon@movementarian.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®