patch-2.1.4 linux/fs/pipe.c

Next file: linux/fs/proc/array.c
Previous file: linux/fs/open.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.3/linux/fs/pipe.c linux/fs/pipe.c
@@ -51,10 +51,6 @@
 		interruptible_sleep_on(&PIPE_WAIT(*inode));
 	}
 	PIPE_LOCK(*inode)++;
-	if (exception()) {
-		PIPE_LOCK(*inode)--;
-		return -EFAULT;
-	}
 	while (count>0 && (size = PIPE_SIZE(*inode))) {
 		chars = PIPE_MAX_RCHUNK(*inode);
 		if (chars > count)
@@ -67,10 +63,9 @@
 		PIPE_START(*inode) &= (PIPE_BUF-1);
 		PIPE_LEN(*inode) -= chars;
 		count -= chars;
-		memcpy_tofs(buf, pipebuf, chars );
+		copy_to_user(buf, pipebuf, chars );
 		buf += chars;
 	}
-	end_exception();
 	PIPE_LOCK(*inode)--;
 	wake_up_interruptible(&PIPE_WAIT(*inode));
 	if (read) {
@@ -110,10 +105,6 @@
 			interruptible_sleep_on(&PIPE_WAIT(*inode));
 		}
 		PIPE_LOCK(*inode)++;
-		if (exception()) {
-			PIPE_LOCK(*inode)--;
-			return -EFAULT;
-		}
 		while (count>0 && (free = PIPE_FREE(*inode))) {
 			chars = PIPE_MAX_WCHUNK(*inode);
 			if (chars > count)
@@ -124,10 +115,9 @@
 			written += chars;
 			PIPE_LEN(*inode) += chars;
 			count -= chars;
-			memcpy_fromfs(pipebuf, buf, chars );
+			copy_from_user(pipebuf, buf, chars );
 			buf += chars;
 		}
-		end_exception();
 		PIPE_LOCK(*inode)--;
 		wake_up_interruptible(&PIPE_WAIT(*inode));
 		free = 1;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov