summaryrefslogtreecommitdiff
path: root/linux/auth.c
diff options
context:
space:
mode:
authorGareth Hughes <gareth@users.sourceforge.net>2000-09-06 20:56:34 +0000
committerGareth Hughes <gareth@users.sourceforge.net>2000-09-06 20:56:34 +0000
commit7db6449142ca24183f50e6f9dcf396b899b4113b (patch)
tree351a460b510edd1b4236323e98d41892e843593c /linux/auth.c
parente3e2d66131a3615379fe81ea106d7133da084683 (diff)
Sync with 2.4.0-test8-pre5 kernel.
Diffstat (limited to 'linux/auth.c')
-rw-r--r--linux/auth.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/linux/auth.c b/linux/auth.c
index 4556bd96..80bb4b65 100644
--- a/linux/auth.c
+++ b/linux/auth.c
@@ -137,7 +137,8 @@ int drm_getmagic(struct inode *inode, struct file *filp, unsigned int cmd,
}
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 @@ int drm_authmagic(struct inode *inode, struct file *filp, unsigned int cmd,
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;