mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 17:30:02 +00:00
drm/radeon/kms: add missing copy from user
This hasn't mattered up until the ioctl started using the value, and it fell apart. fixes fd.o 29340, Ubuntu LP 606081 [airlied: cleaned up whitespace and don't need an error before pushing] Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Cc: stable@kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
96576a9e1a
commit
d8ab355750
1 changed files with 3 additions and 1 deletions
|
@ -112,7 +112,9 @@ int radeon_info_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)
|
|||
|
||||
info = data;
|
||||
value_ptr = (uint32_t *)((unsigned long)info->value);
|
||||
value = *value_ptr;
|
||||
if (DRM_COPY_FROM_USER(&value, value_ptr, sizeof(value)))
|
||||
return -EFAULT;
|
||||
|
||||
switch (info->request) {
|
||||
case RADEON_INFO_DEVICE_ID:
|
||||
value = dev->pci_device;
|
||||
|
|
Loading…
Reference in a new issue