patch-2.1.4 linux/net/appletalk/ddp.c

Next file: linux/net/ax25/af_ax25.c
Previous file: linux/mm/vmscan.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.3/linux/net/appletalk/ddp.c linux/net/appletalk/ddp.c
@@ -744,7 +744,7 @@
 	if(err)
 		return err;
 	
-	memcpy_fromfs(&atreq,arg,sizeof(atreq));
+	copy_from_user(&atreq,arg,sizeof(atreq));
 	
 	if((dev=dev_get(atreq.ifr_name))==NULL)
 		return -ENODEV;
@@ -855,7 +855,7 @@
 			((struct sockaddr_at *)(&atreq.ifr_addr))->sat_addr.s_node=ATADDR_BCAST;
 			break;
 	}
-	memcpy_tofs(arg,&atreq,sizeof(atreq));
+	copy_to_user(arg,&atreq,sizeof(atreq));
 	return 0;
 }
 
@@ -871,7 +871,7 @@
 	err=verify_area(VERIFY_READ, arg, sizeof(rt));
 	if(err)
 		return err;
-	memcpy_fromfs(&rt,arg,sizeof(rt));
+	copy_from_user(&rt,arg,sizeof(rt));
 	
 	switch(cmd)
 	{
@@ -1904,7 +1904,7 @@
 				err=verify_area(VERIFY_WRITE,(void *)arg,sizeof(struct timeval));
 				if(err)
 					return err;
-					memcpy_tofs((void *)arg,&sk->stamp,sizeof(struct timeval));
+					copy_to_user((void *)arg,&sk->stamp,sizeof(struct timeval));
 				return 0;
 			}
 			return -EINVAL;
@@ -1951,10 +1951,10 @@
 		default:
 			return -EINVAL;
 	}
-	err=verify_area(VERIFY_WRITE,(void *)arg,sizeof(unsigned long));
+	err=verify_area(VERIFY_WRITE,(void *)arg,sizeof(int));
 	if(err)
 		return err;
-	put_fs_long(amount,(unsigned long *)arg);
+	put_user(amount, (int *)arg);
 	return(0);
 }
 

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