linux/drivers/gpu
Sinclair Yeh 26823129d8 drm/vmwgfx: Make sure backup_handle is always valid
commit 07678eca2c upstream.

When vmw_gb_surface_define_ioctl() is called with an existing buffer,
we end up returning an uninitialized variable in the backup_handle.

The fix is to first initialize backup_handle to 0 just to be sure, and
second, when a user-provided buffer is found, we will use the
req->buffer_handle as the backup_handle.

Reported-by: Murray McAllister <murray.mcallister@insomniasec.com>
Signed-off-by: Sinclair Yeh <syeh@vmware.com>
Reviewed-by: Deepak Rawat <drawat@vmware.com>
[bwh: Backported to 3.16: There's no size check after vmw_user_dmabuf_lookup(),
 so only check ret == 0.]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
History 2017-07-18 18:40:40 +01:00
..
drm drm/vmwgfx: Make sure backup_handle is always valid 2017-07-18 18:40:40 +01:00
host1x gpu: host1x: Rename internal functions for clarity 2014-06-05 23:10:30 +02:00
ipu-v3 Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2014-06-12 11:32:30 -07:00
vga vgaarb: fix signal handling in vga_get() 2016-01-18 22:27:27 +00:00
Makefile gpu: ipu-v3: Move i.MX IPUv3 core driver out of staging 2014-06-04 11:06:52 +02:00