From 7db6449142ca24183f50e6f9dcf396b899b4113b Mon Sep 17 00:00:00 2001 From: Gareth Hughes Date: Wed, 6 Sep 2000 20:56:34 +0000 Subject: Sync with 2.4.0-test8-pre5 kernel. --- linux/auth.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'linux/auth.c') 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; -- cgit v1.2.3