summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_ioc32.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman2019-06-23 09:21:15 +0200
committerGreg Kroah-Hartman2019-06-23 09:21:15 +0200
commit58ee01007c9e00531c1280b2d99b49d29a5e9844 (patch)
treed1feb7102591a811b4458e2e209d476580ae3687 /drivers/gpu/drm/drm_ioc32.c
parentusb: clean up some of the computations in adu_read (diff)
parentLinux 5.2-rc6 (diff)
downloadkernel-qcow2-linux-58ee01007c9e00531c1280b2d99b49d29a5e9844.tar.gz
kernel-qcow2-linux-58ee01007c9e00531c1280b2d99b49d29a5e9844.tar.xz
kernel-qcow2-linux-58ee01007c9e00531c1280b2d99b49d29a5e9844.zip
Merge 5.2-rc6 into usb-next
We need the USB fixes in here too. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/gpu/drm/drm_ioc32.c')
-rw-r--r--drivers/gpu/drm/drm_ioc32.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_ioc32.c b/drivers/gpu/drm/drm_ioc32.c
index 374b372da58a..3972ebe48463 100644
--- a/drivers/gpu/drm/drm_ioc32.c
+++ b/drivers/gpu/drm/drm_ioc32.c
@@ -375,7 +375,10 @@ static int copy_one_buf32(void *data, int count, struct drm_buf_entry *from)
.size = from->buf_size,
.low_mark = from->low_mark,
.high_mark = from->high_mark};
- return copy_to_user(to + count, &v, offsetof(drm_buf_desc32_t, flags));
+
+ if (copy_to_user(to + count, &v, offsetof(drm_buf_desc32_t, flags)))
+ return -EFAULT;
+ return 0;
}
static int drm_legacy_infobufs32(struct drm_device *dev, void *data,