drm: Add missing __user annotation
Subsystems (2)
PATCH 1/1 drm: Add missing __user annotation
From: Thierry Reding <[email protected]>
The drm_copy_field() function copies strings into userspace buffers, so the first parameter needs to have a __user annotation to avoid warnings from the sparse checker.
Signed-off-by Thierry Reding <[email protected]>
--- drivers/gpu/drm/drm_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/drm_drv.c +1 -1
@@ -233,7 +233,7 @@ module_exit(drm_core_exit);/** * Copy and IOCTL return string to user space */ -static int drm_copy_field (char *buf,size_t *buf_len,const char *value) +static int drm_copy_field (char __user *buf,size_t *buf_len,const char *value) {int len;
Signature · 1 line
2.0.1
Hi
Quoted 5 lines · Thierry Reding
From: Thierry Reding <[email protected]>
The
drm_copy_field()function copies strings into userspace buffers, so the first parameter needs to have a__userannotation to avoid warnings from the sparse checker.
Reviewed-by David Herrmann <[email protected]>
Thanks
David
Quoted 25 lines
Signed-off-by Thierry Reding <[email protected]>--- drivers/gpu/drm/drm_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/drm_drv.c +1
-2@@ -233,7 +233,7 @@ module_exit(drm_core_exit);/** * Copy and IOCTL return string to user space */ -static int drm_copy_field (char *buf,size_t *buf_len,const char *value) +static int drm_copy_field (char __user *buf,size_t *buf_len,const char *value) {int len; --2.0.1
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel