"list" and "request" are already declared as __user pointers, it's just
this cast which is missing the annotation.

Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
---
Sparse doesn't complain about this because it hits the "error: bad
integer constant expression" and stops printing warnings.

diff --git a/drivers/gpu/drm/drm_ioc32.c b/drivers/gpu/drm/drm_ioc32.c
index 2f4c434..764794b 100644
--- a/drivers/gpu/drm/drm_ioc32.c
+++ b/drivers/gpu/drm/drm_ioc32.c
@@ -457,7 +457,7 @@ static int compat_drm_infobufs(struct file *file, unsigned 
int cmd,
        request = compat_alloc_user_space(nbytes);
        if (!access_ok(VERIFY_WRITE, request, nbytes))
                return -EFAULT;
-       list = (struct drm_buf_desc *) (request + 1);
+       list = (struct drm_buf_desc __user *) (request + 1);
 
        if (__put_user(count, &request->count)
            || __put_user(list, &request->list))
@@ -518,7 +518,7 @@ static int compat_drm_mapbufs(struct file *file, unsigned 
int cmd,
        request = compat_alloc_user_space(nbytes);
        if (!access_ok(VERIFY_WRITE, request, nbytes))
                return -EFAULT;
-       list = (struct drm_buf_pub *) (request + 1);
+       list = (struct drm_buf_pub __user *) (request + 1);
 
        if (__put_user(count, &request->count)
            || __put_user(list, &request->list))
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

Reply via email to