<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/kernel/panic.c, branch v3.4.70</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.4.70</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.4.70'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2013-04-12T16:38:47Z</updated>
<entry>
<title>panic: fix a possible deadlock in panic()</title>
<updated>2013-04-12T16:38:47Z</updated>
<author>
<name>Vikram Mulukutla</name>
<email>markivx@codeaurora.org</email>
</author>
<published>2012-07-30T21:39:58Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=5592a94b44df6e6d48e34cfe596844637a2976ac'/>
<id>urn:sha1:5592a94b44df6e6d48e34cfe596844637a2976ac</id>
<content type='text'>
commit 190320c3b6640d4104650f55ff69611e050ea06b upstream.

panic_lock is meant to ensure that panic processing takes place only on
one cpu; if any of the other cpus encounter a panic, they will spin
waiting to be shut down.

However, this causes a regression in this scenario:

1. Cpu 0 encounters a panic and acquires the panic_lock
   and proceeds with the panic processing.
2. There is an interrupt on cpu 0 that also encounters
   an error condition and invokes panic.
3. This second invocation fails to acquire the panic_lock
   and enters the infinite while loop in panic_smp_self_stop.

Thus all panic processing is stopped, and the cpu is stuck for eternity
in the while(1) inside panic_smp_self_stop.

To address this, disable local interrupts with local_irq_disable before
acquiring the panic_lock.  This will prevent interrupt handlers from
executing during the panic processing, thus avoiding this particular
problem.

Signed-off-by: Vikram Mulukutla &lt;markivx@codeaurora.org&gt;
Reviewed-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Cc: Michael Holzheu &lt;holzheu@linux.vnet.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>kdump: Execute kmsg_dump(KMSG_DUMP_PANIC) after smp_send_stop()</title>
<updated>2012-06-22T18:36:56Z</updated>
<author>
<name>Seiji Aguchi</name>
<email>seiji.aguchi@hds.com</email>
</author>
<published>2012-05-15T21:35:09Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=d64cbbc9603861015cd616327f63b10394c0418a'/>
<id>urn:sha1:d64cbbc9603861015cd616327f63b10394c0418a</id>
<content type='text'>
commit 62be73eafaa045d3233337303fb140f7f8a61135 upstream.

This patch moves kmsg_dump(KMSG_DUMP_PANIC) below smp_send_stop(),
to serialize the crash-logging process via smp_send_stop() and to
thus retrieve a more stable crash image of all CPUs stopped.

Signed-off-by: Seiji Aguchi &lt;seiji.aguchi@hds.com&gt;
Acked-by: Don Zickus &lt;dzickus@redhat.com&gt;
Cc: dle-develop@lists.sourceforge.net &lt;dle-develop@lists.sourceforge.net&gt;
Cc: Satoru Moriya &lt;satoru.moriya@hds.com&gt;
Cc: Tony Luck &lt;tony.luck@intel.com&gt;
Cc: a.p.zijlstra@chello.nl &lt;a.p.zijlstra@chello.nl&gt;
Link: http://lkml.kernel.org/r/5C4C569E8A4B9B42A84A977CF070A35B2E4D7A5CE2@USINDEVS01.corp.hds.com
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>panic: fix stack dump print on direct call to panic()</title>
<updated>2012-04-12T20:12:12Z</updated>
<author>
<name>Jason Wessel</name>
<email>jason.wessel@windriver.com</email>
</author>
<published>2012-04-12T19:49:17Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=026ee1f66aaa7f01b617a0ba89ac4b531f9603f1'/>
<id>urn:sha1:026ee1f66aaa7f01b617a0ba89ac4b531f9603f1</id>
<content type='text'>
Commit 6e6f0a1f0fa6 ("panic: don't print redundant backtraces on oops")
causes a regression where no stack trace will be printed at all for the
case where kernel code calls panic() directly while not processing an
oops, and of course there are 100's of instances of this type of call.

The original commit executed the check (!oops_in_progress), but this will
always be false because just before the dump_stack() there is a call to
bust_spinlocks(1), which does the following:

  void __attribute__((weak)) bust_spinlocks(int yes)
  {
	if (yes) {
		++oops_in_progress;

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 &gt; 1
     This guards against the rare case where panic() is invoked
     a second time, or in between oops_begin() and oops_end()

Signed-off-by: Jason Wessel &lt;jason.wessel@windriver.com&gt;
Cc: Andi Kleen &lt;ak@linux.intel.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;	[3.3+]
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>panic: don't print redundant backtraces on oops</title>
<updated>2012-01-13T04:13:11Z</updated>
<author>
<name>Andi Kleen</name>
<email>ak@linux.intel.com</email>
</author>
<published>2012-01-13T01:20:30Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=6e6f0a1f0fa6bba1493c296eb30d1e176e1f8530'/>
<id>urn:sha1:6e6f0a1f0fa6bba1493c296eb30d1e176e1f8530</id>
<content type='text'>
When an oops causes a panic and panic prints another backtrace it's pretty
common to have the original oops data be scrolled away on a 80x50 screen.

The second backtrace is quite redundant and not needed anyways.

So don't print the panic backtrace when oops_in_progress is true.

[akpm@linux-foundation.org: add comment]
Signed-off-by: Andi Kleen &lt;ak@linux.intel.com&gt;
Cc: Michael Holzheu &lt;holzheu@linux.vnet.ibm.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>kdump: fix crash_kexec()/smp_send_stop() race in panic()</title>
<updated>2012-01-13T04:13:11Z</updated>
<author>
<name>Michael Holzheu</name>
<email>holzheu@linux.vnet.ibm.com</email>
</author>
<published>2012-01-13T01:20:18Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=93e13a360ba331915220f82f6e9543df961ffa1f'/>
<id>urn:sha1:93e13a360ba331915220f82f6e9543df961ffa1f</id>
<content type='text'>
When two CPUs call panic at the same time there is a possible race
condition that can stop kdump.  The first CPU calls crash_kexec() and the
second CPU calls smp_send_stop() in panic() before crash_kexec() finished
on the first CPU.  So the second CPU stops the first CPU and therefore
kdump fails:

1st CPU:
  panic()-&gt;crash_kexec()-&gt;mutex_trylock(&amp;kexec_mutex)-&gt; do kdump

2nd CPU:
  panic()-&gt;crash_kexec()-&gt;kexec_mutex already held by 1st CPU
       -&gt;smp_send_stop()-&gt; stop 1st CPU (stop kdump)

This patch fixes the problem by introducing a spinlock in panic that
allows only one CPU to process crash_kexec() and the subsequent panic
code.

All other CPUs call the weak function panic_smp_self_stop() that stops the
CPU itself.  This function can be overloaded by architecture code.  For
example "tile" can use their lower-power "nap" instruction for that.

Signed-off-by: Michael Holzheu &lt;holzheu@linux.vnet.ibm.com&gt;
Acked-by: Chris Metcalf &lt;cmetcalf@tilera.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>treewide: remove useless NORET_TYPE macro and uses</title>
<updated>2012-01-13T04:13:03Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2012-01-13T01:17:17Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9402c95f34a66e81eba473a2f7267bbae5a1dee2'/>
<id>urn:sha1:9402c95f34a66e81eba473a2f7267bbae5a1dee2</id>
<content type='text'>
It's a very old and now unused prototype marking so just delete it.

Neaten panic pointer argument style to keep checkpatch quiet.

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Haavard Skinnemoen &lt;hskinnemoen@gmail.com&gt;
Cc: Hans-Christian Egtvedt &lt;egtvedt@samfundet.no&gt;
Cc: Tony Luck &lt;tony.luck@intel.com&gt;
Cc: Fenghua Yu &lt;fenghua.yu@intel.com&gt;
Acked-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Acked-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
Cc: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Cc: Paul Mackerras &lt;paulus@samba.org&gt;
Cc: Martin Schwidefsky &lt;schwidefsky@de.ibm.com&gt;
Cc: Heiko Carstens &lt;heiko.carstens@de.ibm.com&gt;
Cc: Chris Metcalf &lt;cmetcalf@tilera.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>lockdep, bug: Exclude TAINT_OOT_MODULE from disabling lock debugging</title>
<updated>2011-12-07T22:32:10Z</updated>
<author>
<name>Ben Hutchings</name>
<email>ben@decadent.org.uk</email>
</author>
<published>2011-12-07T14:30:58Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9ec84acee1e221d99dc33237bff5e82839d10cc0'/>
<id>urn:sha1:9ec84acee1e221d99dc33237bff5e82839d10cc0</id>
<content type='text'>
We do want to allow lock debugging for GPL-compatible modules
that are not (yet) built in-tree.  This was disabled as a
side-effect of commit 2449b8ba0745327c5fa49a8d9acffe03b2eded69
('module,bug: Add TAINT_OOT_MODULE flag for modules not built
in-tree').  Lock debug warnings now include taint flags, so
kernel developers should still be able to deflect warnings
caused by out-of-tree modules.

The TAINT_PROPRIETARY_MODULE flag for non-GPL-compatible modules
will still disable lock debugging.

Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Cc: Nick Bowler &lt;nbowler@elliptictech.com&gt;
Cc: Greg KH &lt;greg@kroah.com&gt;
Cc: Dave Jones &lt;davej@redhat.com&gt;
Cc: Rusty Russell &lt;rusty@rustcorp.com.au&gt;
Cc: Randy Dunlap &lt;rdunlap@xenotime.net&gt;
Cc: Debian kernel maintainers &lt;debian-kernel@lists.debian.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: Alan Cox &lt;alan@linux.intel.com&gt;
Link: http://lkml.kernel.org/r/1323268258.18450.11.camel@deadeye
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>lockdep, bug: Exclude TAINT_FIRMWARE_WORKAROUND from disabling lockdep</title>
<updated>2011-12-06T07:16:47Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>a.p.zijlstra@chello.nl</email>
</author>
<published>2011-11-14T12:13:49Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=df754e6af2f237a6c020c0daff55a1a609338e31'/>
<id>urn:sha1:df754e6af2f237a6c020c0daff55a1a609338e31</id>
<content type='text'>
It's unlikely that TAINT_FIRMWARE_WORKAROUND causes false
lockdep messages, so do not disable lockdep in that case.
We still want to keep lockdep disabled in the
TAINT_OOT_MODULE case:

  - bin-only modules can cause various instabilities in
    their and in unrelated kernel code

  - they are impossible to debug for kernel developers

  - they also typically do not have the copyright license
    permission to link to the GPL-ed lockdep code.

Suggested-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Link: http://lkml.kernel.org/n/tip-xopopjjens57r0i13qnyh2yo@git.kernel.org
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
</entry>
<entry>
<title>module,bug: Add TAINT_OOT_MODULE flag for modules not built in-tree</title>
<updated>2011-11-06T21:24:42Z</updated>
<author>
<name>Ben Hutchings</name>
<email>ben@decadent.org.uk</email>
</author>
<published>2011-10-24T13:12:28Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2449b8ba0745327c5fa49a8d9acffe03b2eded69'/>
<id>urn:sha1:2449b8ba0745327c5fa49a8d9acffe03b2eded69</id>
<content type='text'>
Use of the GPL or a compatible licence doesn't necessarily make the code
any good.  We already consider staging modules to be suspect, and this
should also be true for out-of-tree modules which may receive very
little review.

Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Reviewed-by: Dave Jones &lt;davej@redhat.com&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Signed-off-by: Rusty Russell &lt;rusty@rustcorp.com.au&gt; (patched oops-tracing.txt)
</content>
</entry>
<entry>
<title>panic: panic=-1 for immediate reboot</title>
<updated>2011-07-26T23:49:45Z</updated>
<author>
<name>Hugh Dickins</name>
<email>hughd@chromium.org</email>
</author>
<published>2011-07-26T23:08:52Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=4302fbc8ec2ccae279c939f241bf8ce64e1a0bb7'/>
<id>urn:sha1:4302fbc8ec2ccae279c939f241bf8ce64e1a0bb7</id>
<content type='text'>
When a kernel BUG or oops occurs, ChromeOS intends to panic and
immediately reboot, with stacktrace and other messages preserved in RAM
across reboot.

But the longer we delay, the more likely the user is to poweroff and
lose the info.

panic_timeout (seconds before rebooting) is set by panic= boot option or
sysctl or /proc/sys/kernel/panic; but 0 means wait forever, so at
present we have to delay at least 1 second.

Let a negative number mean reboot immediately (with the small cosmetic
benefit of suppressing that newline-less "Rebooting in %d seconds.."
message).

Signed-off-by: Hugh Dickins &lt;hughd@chromium.org&gt;
Signed-off-by: Mandeep Singh Baines &lt;msb@chromium.org&gt;
Cc: Huang Ying &lt;ying.huang@intel.com&gt;
Cc: Andi Kleen &lt;ak@linux.intel.com&gt;
Cc: Hugh Dickins &lt;hughd@google.com&gt;
Cc: Olaf Hering &lt;olaf@aepfle.de&gt;
Cc: Jesse Barnes &lt;jbarnes@virtuousgeek.org&gt;
Cc: Dave Airlie &lt;airlied@gmail.com&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
Cc: Alan Cox &lt;alan@lxorguk.ukuu.org.uk&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
