patch-2.4.0-test8 linux/drivers/char/drm/auth.c

Next file: linux/drivers/char/drm/bufs.c
Previous file: linux/drivers/char/drm/agpsupport.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test7/linux/drivers/char/drm/auth.c linux/drivers/char/drm/auth.c
@@ -137,7 +137,8 @@
 	}
 	
 	DRM_DEBUG("%u\n", auth.magic);
-	copy_to_user_ret((drm_auth_t *)arg, &auth, sizeof(auth), -EFAULT);
+	if (copy_to_user((drm_auth_t *)arg, &auth, sizeof(auth)))
+		return -EFAULT;
 	return 0;
 }
 
@@ -149,7 +150,8 @@
 	drm_auth_t	   auth;
 	drm_file_t	   *file;
 
-	copy_from_user_ret(&auth, (drm_auth_t *)arg, sizeof(auth), -EFAULT);
+	if (copy_from_user(&auth, (drm_auth_t *)arg, sizeof(auth)))
+		return -EFAULT;
 	DRM_DEBUG("%u\n", auth.magic);
 	if ((file = drm_find_file(dev, auth.magic))) {
 		file->authenticated = 1;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)