patch-2.1.2 linux/drivers/char/pty.c
Next file: linux/drivers/char/tty_io.c
Previous file: linux/drivers/char/pcxx.c
Back to the patch index
Back to the overall index
- Lines: 19
- Date:
Tue Oct 8 11:17:30 1996
- Orig file:
v2.1.1/linux/drivers/char/pty.c
- Orig date:
Sat Sep 28 22:58:22 1996
diff -u --recursive --new-file v2.1.1/linux/drivers/char/pty.c linux/drivers/char/pty.c
@@ -123,6 +123,10 @@
down(&tmp_buf_sem);
temp_buffer = tmp_buf +
((tty->driver.subtype-1) * PTY_BUF_SIZE);
+ if (exception()) {
+ up(&tmp_buf_sem);
+ return -EFAULT;
+ }
while (count > 0) {
n = MIN(count, PTY_BUF_SIZE);
memcpy_fromfs(temp_buffer, buf, n);
@@ -134,6 +138,7 @@
buf += n; c+= n;
count -= n;
}
+ end_exception();
up(&tmp_buf_sem);
} else {
c = MIN(count, to->ldisc.receive_room(to));
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov