patch-2.3.9 linux/drivers/char/tty_io.c

Next file: linux/drivers/char/vino.c
Previous file: linux/drivers/char/tpqic02.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.8/linux/drivers/char/tty_io.c linux/drivers/char/tty_io.c
@@ -628,10 +628,12 @@
 			return -ERESTARTSYS;
 		}
 #endif
+	lock_kernel();
 	if (tty->ldisc.read)
 		i = (tty->ldisc.read)(tty,file,buf,count);
 	else
 		i = -EIO;
+	unlock_kernel();
 	if (i > 0)
 		inode->i_atime = CURRENT_TIME;
 	return i;
@@ -658,7 +660,9 @@
 		unsigned long size = PAGE_SIZE*2;
 		if (size > count)
 			size = count;
+		lock_kernel();
 		ret = write(tty, file, buf, size);
+		unlock_kernel();
 		if (ret <= 0)
 			break;
 		written += ret;

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