mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ard van Breemen <ard@telegraafnet.nl>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] init: Scream bloody murder if interrupts are enabled too early
Date: Fri, 8 Mar 2013 10:03:01 +0100	[thread overview]
Message-ID: <20130308090300.GM1585@telegraafnet.nl> (raw)
In-Reply-To: <1362694743.31874.66.camel@gandalf.local.home>

Hi,

On Thu, Mar 07, 2013 at 05:19:03PM -0500, Steven Rostedt wrote:
> diff --git a/init/main.c b/init/main.c
> index 63534a1..f0fe0a5 100644
> --- a/init/main.c
> +++ b/init/main.c
> @@ -539,7 +539,7 @@ asmlinkage void __init start_kernel(void)
>  	 * fragile until we cpu_idle() for the first time.
>  	 */
>  	preempt_disable();
> -	if (!irqs_disabled()) {
> +	if (WARN_ON(!irqs_disabled())) {
>  		printk(KERN_WARNING "start_kernel(): bug: interrupts were "
>  				"enabled *very* early, fixing it\n");
>  		local_irq_disable();
> 

The original code was a few versions before the WARN macros.
I think it's better to just change the printk to something like:
WARN(1,"interrupts were enabled *very* early, fixing it\n")

This will print the cause of the warning and then dump stack,
instead of having an unrelated message under the stackdump.

But: IANAM(acro)E(xpert), the real incantation might be
different.
But you are absolutely right that we should scream and shout.
This time in a way that's more in line with the others.

Regards,
Ard van Breemen.


  reply	other threads:[~2013-03-08  9:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-07 22:19 Steven Rostedt
2013-03-08  9:03 ` Ard van Breemen [this message]
2013-03-08 11:38   ` Steven Rostedt
2013-03-08 19:49 ` Paul E. McKenney

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=20130308090300.GM1585@telegraafnet.nl \
    --to=ard@telegraafnet.nl \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    /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®