patch-2.4.22 linux-2.4.22/kernel/printk.c

Next file: linux-2.4.22/kernel/ptrace.c
Previous file: linux-2.4.22/kernel/module.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.21/kernel/printk.c linux-2.4.22/kernel/printk.c
@@ -556,7 +556,14 @@
 {
 	struct console *c;
 
-	acquire_console_sem();
+	/*
+	 * Try to get the console semaphore. If someone else owns it
+	 * we have to return without unblanking because console_unblank
+	 * may be called in interrupt context.
+	 */
+	if (down_trylock(&console_sem) != 0)
+		return;
+	console_may_schedule = 0;
 	for (c = console_drivers; c != NULL; c = c->next)
 		if ((c->flags & CON_ENABLED) && c->unblank)
 			c->unblank();

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)