LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Andres Salomon <dilinger@debian.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>,
	linux-kernel@vger.kernel.org
Subject: [PATCH] highres: warn on softirq handling an unsafe callback
Date: Mon, 05 Mar 2007 05:02:07 -0500	[thread overview]
Message-ID: <45EBEA9F.9070109@debian.org> (raw)

[-- 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;

             reply	other threads:[~2007-03-05 10:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-05 10:02 Andres Salomon [this message]
2007-03-05 10:07 ` Ingo Molnar

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=45EBEA9F.9070109@debian.org \
    --to=dilinger@debian.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    --subject='Re: [PATCH] highres: warn on softirq handling an unsafe callback' \
    /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

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).