Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm: Add missing __user annotation

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 <treding@nvidia.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>

authored by

Thierry Reding and committed by
Dave Airlie
d3cf40ed e7c36347

+1 -1
+1 -1
drivers/gpu/drm/drm_drv.c
··· 233 233 /** 234 234 * Copy and IOCTL return string to user space 235 235 */ 236 - static int drm_copy_field(char *buf, size_t *buf_len, const char *value) 236 + static int drm_copy_field(char __user *buf, size_t *buf_len, const char *value) 237 237 { 238 238 int len; 239 239