The usual way to collapse the kernel is with a macro BUG(). There's also a WARN()macro that drops the stack to the console, but the kernel continues to work.
http://kernelnewbies.org/FAQ/BUG
, BUG() ( ) - (, ) panic_on_oops. 0, โโ ( - ). 1, โโ .
โโ , <SysRq> + <c> (, , echo c > /proc/sysrq-trigger). (http://code.metager.de/source/xref/linux/stable/drivers/tty/sysrq.c#134):
static void sysrq_handle_crash(int key)
{
char *killer = NULL;
panic_on_oops = 1;
wmb();
*killer = 1;
}
, , .