mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] panic: call bust_spinlocks(0) before dying
@ 2009-10-02 11:41 Aaro Koskinen
  2009-10-02 12:07 ` Frédéric Weisbecker
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Aaro Koskinen @ 2009-10-02 11:41 UTC (permalink / raw)
  To: mingo, akpm, arjan, ak, fweisbec, linux-kernel

Commit ffd71da4e3f323b7673b061e6f7e0d0c12dc2b49 moved bust_spinlocks(0)
to the end of the function, which in practice is never reached. As a
result console_unblank() is not called, and on some systems the user
may not see the panic message.

Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
---
 kernel/panic.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/kernel/panic.c b/kernel/panic.c
index bcdef26..96b45d0 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -90,6 +90,8 @@ NORET_TYPE void panic(const char * fmt, ...)
 
 	atomic_notifier_call_chain(&panic_notifier_list, 0, buf);
 
+	bust_spinlocks(0);
+
 	if (!panic_blink)
 		panic_blink = no_blink;
 
@@ -136,7 +138,6 @@ NORET_TYPE void panic(const char * fmt, ...)
 		mdelay(1);
 		i++;
 	}
-	bust_spinlocks(0);
 }
 
 EXPORT_SYMBOL(panic);
-- 
1.5.4.3


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] panic: call bust_spinlocks(0) before dying
  2009-10-02 11:41 [PATCH] panic: call bust_spinlocks(0) before dying Aaro Koskinen
@ 2009-10-02 12:07 ` Frédéric Weisbecker
  2009-10-02 12:34 ` [tip:core/urgent] panic: Fix panic message visibility by calling " tip-bot for Aaro Koskinen
  2009-10-05 19:11 ` tip-bot for Aaro Koskinen
  2 siblings, 0 replies; 4+ messages in thread
From: Frédéric Weisbecker @ 2009-10-02 12:07 UTC (permalink / raw)
  To: Aaro Koskinen; +Cc: mingo, akpm, arjan, ak, linux-kernel

2009/10/2 Aaro Koskinen <aaro.koskinen@nokia.com>:
> Commit ffd71da4e3f323b7673b061e6f7e0d0c12dc2b49 moved bust_spinlocks(0)
> to the end of the function, which in practice is never reached. As a
> result console_unblank() is not called, and on some systems the user
> may not see the panic message.


Indeed.


> Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
> ---
>  kernel/panic.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/kernel/panic.c b/kernel/panic.c
> index bcdef26..96b45d0 100644
> --- a/kernel/panic.c
> +++ b/kernel/panic.c
> @@ -90,6 +90,8 @@ NORET_TYPE void panic(const char * fmt, ...)
>
>        atomic_notifier_call_chain(&panic_notifier_list, 0, buf);
>
> +       bust_spinlocks(0);
> +

And it looks like the right place to do that. The rest that is going
to be displayed
is messages about countdown before reboot. The most important messages
have been printk'ed already.

Reviewed-by: Frederic Weisbecker <fweisbec@gmail.com>


>        if (!panic_blink)
>                panic_blink = no_blink;
>
> @@ -136,7 +138,6 @@ NORET_TYPE void panic(const char * fmt, ...)
>                mdelay(1);
>                i++;
>        }
> -       bust_spinlocks(0);
>  }
>
>  EXPORT_SYMBOL(panic);
> --
> 1.5.4.3
>
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [tip:core/urgent] panic: Fix panic message visibility by calling bust_spinlocks(0) before dying
  2009-10-02 11:41 [PATCH] panic: call bust_spinlocks(0) before dying Aaro Koskinen
  2009-10-02 12:07 ` Frédéric Weisbecker
@ 2009-10-02 12:34 ` tip-bot for Aaro Koskinen
  2009-10-05 19:11 ` tip-bot for Aaro Koskinen
  2 siblings, 0 replies; 4+ messages in thread
From: tip-bot for Aaro Koskinen @ 2009-10-02 12:34 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, hpa, mingo, fweisbec, aaro.koskinen, tglx, mingo

Commit-ID:  1f6dff52344945f665524f547a27f3cc0388cb90
Gitweb:     http://git.kernel.org/tip/1f6dff52344945f665524f547a27f3cc0388cb90
Author:     Aaro Koskinen <aaro.koskinen@nokia.com>
AuthorDate: Fri, 2 Oct 2009 14:41:20 +0300
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Fri, 2 Oct 2009 14:23:12 +0200

panic: Fix panic message visibility by calling bust_spinlocks(0) before dying

Commit ffd71da4e3f ("panic: decrease oops_in_progress only after
having done the panic") moved bust_spinlocks(0) to the end of the
function, which in practice is never reached.

As a result console_unblank() is not called, and on some systems
the user may not see the panic message.

Move it back up to before the unblanking.

Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Reviewed-by: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <1254483680-25578-1-git-send-email-aaro.koskinen@nokia.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>


---
 kernel/panic.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/kernel/panic.c b/kernel/panic.c
index 512ab73..bc4dcb6 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -90,6 +90,8 @@ NORET_TYPE void panic(const char * fmt, ...)
 
 	atomic_notifier_call_chain(&panic_notifier_list, 0, buf);
 
+	bust_spinlocks(0);
+
 	if (!panic_blink)
 		panic_blink = no_blink;
 
@@ -136,7 +138,6 @@ NORET_TYPE void panic(const char * fmt, ...)
 		mdelay(1);
 		i++;
 	}
-	bust_spinlocks(0);
 }
 
 EXPORT_SYMBOL(panic);

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [tip:core/urgent] panic: Fix panic message visibility by calling bust_spinlocks(0) before dying
  2009-10-02 11:41 [PATCH] panic: call bust_spinlocks(0) before dying Aaro Koskinen
  2009-10-02 12:07 ` Frédéric Weisbecker
  2009-10-02 12:34 ` [tip:core/urgent] panic: Fix panic message visibility by calling " tip-bot for Aaro Koskinen
@ 2009-10-05 19:11 ` tip-bot for Aaro Koskinen
  2 siblings, 0 replies; 4+ messages in thread
From: tip-bot for Aaro Koskinen @ 2009-10-05 19:11 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, hpa, mingo, fweisbec, aaro.koskinen, tglx, mingo

Commit-ID:  d014e8894dfc523dd9d2f2a17b6dcb94facea810
Gitweb:     http://git.kernel.org/tip/d014e8894dfc523dd9d2f2a17b6dcb94facea810
Author:     Aaro Koskinen <aaro.koskinen@nokia.com>
AuthorDate: Fri, 2 Oct 2009 14:41:20 +0300
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Mon, 5 Oct 2009 21:08:09 +0200

panic: Fix panic message visibility by calling bust_spinlocks(0) before dying

Commit ffd71da4e3f ("panic: decrease oops_in_progress only after
having done the panic") moved bust_spinlocks(0) to the end of the
function, which in practice is never reached.

As a result console_unblank() is not called, and on some systems
the user may not see the panic message.

Move it back up to before the unblanking.

Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Reviewed-by: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <1254483680-25578-1-git-send-email-aaro.koskinen@nokia.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>


---
 kernel/panic.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/kernel/panic.c b/kernel/panic.c
index 512ab73..bc4dcb6 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -90,6 +90,8 @@ NORET_TYPE void panic(const char * fmt, ...)
 
 	atomic_notifier_call_chain(&panic_notifier_list, 0, buf);
 
+	bust_spinlocks(0);
+
 	if (!panic_blink)
 		panic_blink = no_blink;
 
@@ -136,7 +138,6 @@ NORET_TYPE void panic(const char * fmt, ...)
 		mdelay(1);
 		i++;
 	}
-	bust_spinlocks(0);
 }
 
 EXPORT_SYMBOL(panic);

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-10-05 19:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-02 11:41 [PATCH] panic: call bust_spinlocks(0) before dying Aaro Koskinen
2009-10-02 12:07 ` Frédéric Weisbecker
2009-10-02 12:34 ` [tip:core/urgent] panic: Fix panic message visibility by calling " tip-bot for Aaro Koskinen
2009-10-05 19:11 ` tip-bot for Aaro Koskinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome