static int panic_notifier(struct notifier_block *self, unsigned long unused1, void *unused2) { if (libcfs_panic_in_progress) return 0; libcfs_panic_in_progress = 1; mb(); #ifdef LNET_DUMP_ON_PANIC /* This is currently disabled because it spews far too much to the * console on the rare cases it is ever triggered. */ if (in_interrupt()) { cfs_trace_debug_print(); } else { # ifdef HAVE_KERNEL_LOCKED while (kernel_locked()) unlock_kernel(); # endif libcfs_debug_dumplog_internal((void *)(long)cfs_curproc_pid()); } #endif return 0; }
static void speakup_stop_ttys(void) { int i; if (!in_atomic()) lock_kernel(); else if (!kernel_locked()) { /* BKL is not held and we are in a critical section, too bad, * let the buffer continue to fill up. * * This only happens with kernel messages and keyboard echo, so * that shouldn't be so much a concern. */ return; } for (i = 0; i < MAX_NR_CONSOLES; i++) if ((vc_cons[i].d != NULL) && (vc_cons[i].d->vc_tty != NULL)) stop_tty(vc_cons[i].d->vc_tty); if (!in_atomic()) unlock_kernel(); return; }