mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-19 18:24:14 +08:00
next: drm/atomic: Use copy_from_user to copy 64 bit data from user space
Copying 64 bit data from user space using get_user is not supported
on all architectures, and may result in the following build error.
ERROR: "__get_user_bad" [drivers/gpu/drm/drm.ko] undefined!
Avoid the problem by using copy_from_user.
Fixes: d34f20d6e2
("drm: Atomic modeset ioctl")
Cc: Rob Clark <robdclark@gmail.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
cdd1cf799b
commit
42c5814c9c
@ -1259,7 +1259,9 @@ retry:
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if (get_user(prop_value, prop_values_ptr + copied_props)) {
|
||||
if (copy_from_user(&prop_value,
|
||||
prop_values_ptr + copied_props,
|
||||
sizeof(prop_value))) {
|
||||
ret = -EFAULT;
|
||||
goto fail;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user