panic/reboot changes (RFC)

From: Josh Huber (huber@mclx.com)
Date: Tue Aug 08 2000 - 16:22:38 EST


Attached is a patch to 2.4.0-test6-pre8 that does the following:

* Adds two functions similar to (un)register_panic_notifier() for
  changing the contents of the panic_notifier_list.
* Adds (un)register_panic_notifier() functions to ksyms.c ones so
  modules can use them. (should these be added to panic.c?) In 2.2.16
  the reboot notifiers are listed in ksyms.c, and not sys.c as they
  are in 2.4-test kernels.
* Moves the call to notifier_call_chain up in panic() so it's the
  first action to be taken.

The reason I believe the notifier_call_chain call should be moved is
that it's important (at least, for debugging systems) to be able to
call a function before buffers are synched to disk, and
smp_send_stop() is called. I also moved unblank_console() to up above
the notifier_call_chain.

For example, in a crash dump system, you want whatever routine is
saving a crash dump to be called prior to sys_sync.

Is this move going to break the three other places it's used?:
indy_reboot_setup, arch/mips/sgi/kernel/reset.c
setup_arch, arch/alpha/kernel/setup.c
ip22_reboot_setup, arch/mips64/sgi-ip22/ip22-reset.c

at first glance, it doesn't look like it.

* added a flag 'panic_on_oops' which will cause a panic instead of an
  oops -- default to 0, but modifiable from /proc/sys. Right now I
  just added a check to the i386 traps.c file, but you get the idea.
* added a panicing flag inside panic() to prevent recursive endless
  calls to panic.

Files touched:
kernel/panic.c
arch/i386/kernel/traps.c
kernel/sysctl.c
include/linux/sysctl.h
include/linux/kernel.h

At this point, I'm just looking for comments, suggestions, etc.

Thanks,

-- 
Josh
6B21489A | GnuPG ID/Fingerprint | huber@mclx.com |
61F0 6138 BE7B FEBF A223  E9D1 BFE1 2065 6B21 489A



- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Aug 15 2000 - 21:00:16 EST