diff options
author | Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com> | 2009-07-29 18:04:14 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-07-29 22:10:36 -0400 |
commit | cab8bd3410d448279e3bd0fbf96d31db0bf770fa (patch) | |
tree | 2ad9262b2c4d10cc705c8553015caff06a29de11 /Documentation | |
parent | f5a55efa140f5e9c9dd0f398fef54f20cdb74ec9 (diff) |
sysrq, kdump: make sysrq-c consistent
commit d6580a9f15238b87e618310c862231ae3f352d2d ("kexec: sysrq: simplify
sysrq-c handler") changed the behavior of sysrq-c to unconditional
dereference of NULL pointer. So in cases with CONFIG_KEXEC, where
crash_kexec() was directly called from sysrq-c before, now it can be said
that a step of "real oops" was inserted before starting kdump.
However, in contrast to oops via SysRq-c from keyboard which results in
panic due to in_interrupt(), oops via "echo c > /proc/sysrq-trigger" will
not become panic unless panic_on_oops=1. It means that even if dump is
properly configured to be taken on panic, the sysrq-c from proc interface
might not start crashdump while the sysrq-c from keyboard can start
crashdump. This confuses traditional users of kdump, i.e. people who
expect sysrq-c to do common behavior in both of the keyboard and proc
interface.
This patch brings the keyboard and proc interface behavior of sysrq-c in
line, by forcing panic_on_oops=1 before oops in sysrq-c handler.
And some updates in documentation are included, to clarify that there is
no longer dependency with CONFIG_KEXEC, and that now the system can just
crash by sysrq-c if no dump mechanism is configured.
Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Cc: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Cc: Brayan Arraes <brayan@yack.com.br>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/sysrq.txt | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Documentation/sysrq.txt b/Documentation/sysrq.txt index cf42b820ff9d..d56a01775423 100644 --- a/Documentation/sysrq.txt +++ b/Documentation/sysrq.txt | |||
@@ -66,7 +66,8 @@ On all - write a character to /proc/sysrq-trigger. e.g.: | |||
66 | 'b' - Will immediately reboot the system without syncing or unmounting | 66 | 'b' - Will immediately reboot the system without syncing or unmounting |
67 | your disks. | 67 | your disks. |
68 | 68 | ||
69 | 'c' - Will perform a kexec reboot in order to take a crashdump. | 69 | 'c' - Will perform a system crash by a NULL pointer dereference. |
70 | A crashdump will be taken if configured. | ||
70 | 71 | ||
71 | 'd' - Shows all locks that are held. | 72 | 'd' - Shows all locks that are held. |
72 | 73 | ||
@@ -141,8 +142,8 @@ useful when you want to exit a program that will not let you switch consoles. | |||
141 | re'B'oot is good when you're unable to shut down. But you should also 'S'ync | 142 | re'B'oot is good when you're unable to shut down. But you should also 'S'ync |
142 | and 'U'mount first. | 143 | and 'U'mount first. |
143 | 144 | ||
144 | 'C'rashdump can be used to manually trigger a crashdump when the system is hung. | 145 | 'C'rash can be used to manually trigger a crashdump when the system is hung. |
145 | The kernel needs to have been built with CONFIG_KEXEC enabled. | 146 | Note that this just triggers a crash if there is no dump mechanism available. |
146 | 147 | ||
147 | 'S'ync is great when your system is locked up, it allows you to sync your | 148 | 'S'ync is great when your system is locked up, it allows you to sync your |
148 | disks and will certainly lessen the chance of data loss and fscking. Note | 149 | disks and will certainly lessen the chance of data loss and fscking. Note |