patch-2.3.18 linux/kernel/printk.c

Next file: linux/kernel/resource.c
Previous file: linux/kernel/dma.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.17/linux/kernel/printk.c linux/kernel/printk.c
@@ -174,10 +174,10 @@
 		error = verify_area(VERIFY_WRITE,buf,len);
 		if (error)
 			goto out;
-		spin_lock_irq(&console_lock);
 		count = len;
 		if (count > LOG_BUF_LEN)
 			count = LOG_BUF_LEN;
+		spin_lock_irq(&console_lock);
 		if (count > logged_chars)
 			count = logged_chars;
 		if (do_clear)

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