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

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

diff -u --recursive --new-file v2.1.3/linux/net/core/dev.c linux/net/core/dev.c
@@ -803,7 +803,7 @@
 	err=verify_area(VERIFY_WRITE, arg, sizeof(struct ifconf));
 	if(err)
 	  	return err;
-	memcpy_fromfs(&ifc, arg, sizeof(struct ifconf));
+	copy_from_user(&ifc, arg, sizeof(struct ifconf));
 	len = ifc.ifc_len;
 	pos = ifc.ifc_buf;
 
@@ -841,7 +841,7 @@
 		 *	Write this block to the caller's space. 
 		 */
 		 
-		memcpy_tofs(pos, &ifr, sizeof(struct ifreq));
+		copy_to_user(pos, &ifr, sizeof(struct ifreq));
 		pos += sizeof(struct ifreq);
 		len -= sizeof(struct ifreq);		
   	}
@@ -852,7 +852,7 @@
 	 
 	ifc.ifc_len = (pos - ifc.ifc_buf);
 	ifc.ifc_req = (struct ifreq *) ifc.ifc_buf;
-	memcpy_tofs(arg, &ifc, sizeof(struct ifconf));
+	copy_to_user(arg, &ifc, sizeof(struct ifconf));
 	
 	/*
 	 *	Report how much was filled in
@@ -972,7 +972,7 @@
 	if(err)
 		return err;
 	
-	memcpy_fromfs(&ifr, arg, sizeof(struct ifreq));
+	copy_from_user(&ifr, arg, sizeof(struct ifreq));
 
 	/*
 	 *	See which interface the caller is talking about. 
@@ -1273,7 +1273,7 @@
 				if(dev->do_ioctl==NULL)
 					return -EOPNOTSUPP;
 				ret=dev->do_ioctl(dev, &ifr, getset);
-				memcpy_tofs(arg,&ifr,sizeof(struct ifreq));
+				copy_to_user(arg,&ifr,sizeof(struct ifreq));
 				break;
 			}
 			
@@ -1284,7 +1284,7 @@
  *	The load of calls that return an ifreq and ok (saves memory).
  */
 rarok:
-	memcpy_tofs(arg, &ifr, sizeof(struct ifreq));
+	copy_to_user(arg, &ifr, sizeof(struct ifreq));
 	return 0;
 }
 

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