public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jason Wessel <jason.wessel@windriver.com>
To: Andi Kleen <ak@linux.intel.com>
Cc: <akpm@linux-foundation.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH][REGRESSION] panic: fix stack dump print on direct call to panic()
Date: Mon, 9 Apr 2012 14:08:44 -0500	[thread overview]
Message-ID: <4F8333BC.3050509@windriver.com> (raw)
In-Reply-To: <4F832BC8.4090907@linux.intel.com>

On 04/09/2012 01:34 PM, Andi Kleen wrote:
>> The proper way to resolve the problem that original commit tried to
>> solve is to avoid printing a stack dump from panic() when the either
>> of the following conditions is true:
>>
>>    1) TAINT_DIE has been set (this is done by oops_end())
>>       This indicates and oops has already been printed.
>>    2) oops_in_progress>  1
>>       This guards against the rare case where panic() is invoked
>>       a second time, or in between oops_begin() and oops_end()
> Oops. I guess can just revert it for now. Thanks for catching, Jason.
>
> The proper solution is probably some variant of
> http://git.kernel.org/?p=linux/kernel/git/ak/linux-mce-2.6.git;a=shortlog;h=refs/heads/mce/xpanic
>
> Let the caller pass in the proper action instead of all these hacks.

That is an interesting patch series, but I am not sure I agree about the caller propagating a flag to control what you see in panic.  I intentionally set CONFIG_DEBUG_VERBOSE=y for a reason, I want a stack trace if and when panic(), oops, BUG, etc... is ever called.  This might be a personal preference, but I do not wish to be searching on a string, to find out where the kernel execution terminated.  I want to see stack traces all the time, with the exception of the cases you pointed out in the original patch.

I had taken the time to instrument and the edge cases for the oops and panic() nesting.  I would agree that it is not useful to print further traces if the kernel has already processed an oops.  I also checked non-x86 archs to see that the original behavior was intact with the new version of the patch.  My opinion is that checking for the panic recursion is a necessary evil here, we just have to agree about the right approach.  :-)

Cheers,
Jason.

  reply	other threads:[~2012-04-09 19:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-09 17:20 [PATCH][REGRESSION] panic: fix stack dump print on direct call to panic() Jason Wessel
2012-04-09 18:34 ` Andi Kleen
2012-04-09 19:08   ` Jason Wessel [this message]
2012-04-09 19:36     ` Andi Kleen
2012-04-10 19:19   ` Andrew Morton
2012-04-10 23:29     ` Andi Kleen

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=4F8333BC.3050509@windriver.com \
    --to=jason.wessel@windriver.com \
    --cc=ak@linux.intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.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