LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] highres: warn on softirq handling an unsafe callback
@ 2007-03-05 10:02 Andres Salomon
2007-03-05 10:07 ` Ingo Molnar
0 siblings, 1 reply; 2+ messages in thread
From: Andres Salomon @ 2007-03-05 10:02 UTC (permalink / raw)
To: Andrew Morton; +Cc: Ingo Molnar, Thomas Gleixner, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 299 bytes --]
run_hrtimer_queue is called from a softirq context, and should never run
a callback that is classified as HRTIMER_CB_IRQSAFE_NO_SOFTIRQ. A bug
in unrelated code had managed to trigger that bug, so let's add an
explicit warning to this function.
Signed-off-by: Andres Salomon <dilinger@debian.org>
[-- Attachment #2: hrtimer5.patch --]
[-- Type: text/x-patch, Size: 482 bytes --]
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c
index 476cb0c..167c296 100644
--- a/kernel/hrtimer.c
+++ b/kernel/hrtimer.c
@@ -1130,6 +1130,7 @@ static inline void run_hrtimer_queue(struct hrtimer_cpu_base *cpu_base,
if (base->softirq_time.tv64 <= timer->expires.tv64)
break;
+ WARN_ON_ONCE(timer->cb_mode == HRTIMER_CB_IRQSAFE_NO_SOFTIRQ);
timer_stats_account_hrtimer(timer);
fn = timer->function;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] highres: warn on softirq handling an unsafe callback
2007-03-05 10:02 [PATCH] highres: warn on softirq handling an unsafe callback Andres Salomon
@ 2007-03-05 10:07 ` Ingo Molnar
0 siblings, 0 replies; 2+ messages in thread
From: Ingo Molnar @ 2007-03-05 10:07 UTC (permalink / raw)
To: Andres Salomon; +Cc: Andrew Morton, Thomas Gleixner, linux-kernel
* Andres Salomon <dilinger@debian.org> wrote:
> run_hrtimer_queue is called from a softirq context, and should never
> run a callback that is classified as HRTIMER_CB_IRQSAFE_NO_SOFTIRQ. A
> bug in unrelated code had managed to trigger that bug, so let's add an
> explicit warning to this function.
>
> Signed-off-by: Andres Salomon <dilinger@debian.org>
thanks.
Acked-by: Ingo Molnar <mingo@elte.hu>
[suggestion for future submissions: please include the patch body as
text, not as a MIME attachment - this makes it easier for upstream
maintainers to process such mails.]
Ingo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-03-05 10:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-05 10:02 [PATCH] highres: warn on softirq handling an unsafe callback Andres Salomon
2007-03-05 10:07 ` Ingo Molnar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).