patch-2.1.4 linux/net/core/iovec.c

Next file: linux/net/core/sock.c
Previous file: linux/net/core/dev.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.3/linux/net/core/iovec.c linux/net/core/iovec.c
@@ -53,7 +53,7 @@
 		err=verify_area(VERIFY_READ, &m->msg_iov[ct], sizeof(struct iovec));
 		if(err)
 			return err;
-		memcpy_fromfs(&iov[ct], &m->msg_iov[ct], sizeof(struct iovec));
+		copy_from_user(&iov[ct], &m->msg_iov[ct], sizeof(struct iovec));
 		err=verify_area(mode, iov[ct].iov_base, iov[ct].iov_len);
 		if(err)
 			return err;
@@ -74,7 +74,7 @@
 		if(iov->iov_len)
 		{
 			int copy = min(iov->iov_len,len);
-			memcpy_tofs(iov->iov_base,kdata,copy);
+			copy_to_user(iov->iov_base,kdata,copy);
 			kdata+=copy;
 			len-=copy;
 			iov->iov_len-=copy;
@@ -95,7 +95,7 @@
 		if(iov->iov_len)
 		{
 			int copy=min(len,iov->iov_len);
-			memcpy_fromfs(kdata, iov->iov_base, copy);
+			copy_from_user(kdata, iov->iov_base, copy);
 			len-=copy;
 			kdata+=copy;
 			iov->iov_base+=copy;

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