https://github.com/torvalds/linux
Revision cab8bd3410d448279e3bd0fbf96d31db0bf770fa authored by Hidetoshi Seto on 29 July 2009, 22:04:14 UTC, committed by Linus Torvalds on 30 July 2009, 02:10:36 UTC
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>
1 parent f5a55ef
History
Tip revision: cab8bd3410d448279e3bd0fbf96d31db0bf770fa authored by Hidetoshi Seto on 29 July 2009, 22:04:14 UTC
sysrq, kdump: make sysrq-c consistent
Tip revision: cab8bd3
File Mode Size
Kconfig -rw-r--r-- 2.5 KB
Kconfig.iosched -rw-r--r-- 1.9 KB
Makefile -rw-r--r-- 569 bytes
as-iosched.c -rw-r--r-- 38.7 KB
blk-barrier.c -rw-r--r-- 9.7 KB
blk-core.c -rw-r--r-- 64.0 KB
blk-exec.c -rw-r--r-- 2.6 KB
blk-integrity.c -rw-r--r-- 9.9 KB
blk-ioc.c -rw-r--r-- 4.0 KB
blk-map.c -rw-r--r-- 8.1 KB
blk-merge.c -rw-r--r-- 9.8 KB
blk-settings.c -rw-r--r-- 21.3 KB
blk-softirq.c -rw-r--r-- 4.1 KB
blk-sysfs.c -rw-r--r-- 11.7 KB
blk-tag.c -rw-r--r-- 9.9 KB
blk-timeout.c -rw-r--r-- 5.7 KB
blk.h -rw-r--r-- 4.5 KB
bsg.c -rw-r--r-- 23.4 KB
cfq-iosched.c -rw-r--r-- 63.9 KB
compat_ioctl.c -rw-r--r-- 21.6 KB
deadline-iosched.c -rw-r--r-- 11.4 KB
elevator.c -rw-r--r-- 24.9 KB
genhd.c -rw-r--r-- 29.1 KB
ioctl.c -rw-r--r-- 8.6 KB
noop-iosched.c -rw-r--r-- 2.6 KB
scsi_ioctl.c -rw-r--r-- 18.0 KB

back to top