linux_old1/drivers/gpu/drm/vmwgfx
Colin Ian King da5efffc42 drm/vmwgfx: Correctly NULLify dma buffer pointer on failure
cppcheck on lines 917 and 977 show an ineffective assignment
to the dma buffer pointer:

[drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c:917]:
[drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c:977]:
  (warning) Assignment of function parameter has no effect
  outside the function. Did you forget dereferencing it?

On a successful DMA buffer lookup, the dma buffer pointer is
assigned, however, on failure it currently is left in an
undefined state.

The original intention in the error exit path was to nullify
the pointer on an error (which the original code failed to
do properly). This patch fixes this also ensures all failure
paths nullify the buffer pointer on the error return.

Fortunately the callers to vmw_translate_mob_ptr and
vmw_translate_guest_ptr are checking on a return status and not
on the dma buffer pointer, so the original code worked.

Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Colin Ian King <colin.king@canonical.com>
2015-03-11 11:47:41 -07:00
..
Kconfig drm: Move plane helpers into drm_kms_helper.ko 2014-06-04 13:36:08 +10:00
Makefile drm/vmwgfx: Fix compat shader namespace 2014-07-04 12:12:09 +02:00
svga3d_reg.h drm/vmwgfx: Remove some unused surface formats 2014-03-02 09:42:53 +01:00
svga3d_surfacedefs.h drm/vmwgfx: Fix possible integer overflow 2014-02-12 19:30:45 +01:00
svga_escape.h vmwgfx: Update register files to latest from vmware-sdk 2011-10-05 10:17:08 +01:00
svga_overlay.h vmwgfx: Update register files to latest from vmware-sdk 2011-10-05 10:17:08 +01:00
svga_reg.h PCI: Move PCI_VENDOR_ID_VMWARE to pci_ids.h 2014-09-24 11:52:09 -06:00
svga_types.h
vmwgfx_buffer.c drm/ttm: flip the switch, and convert to dma_fence 2014-09-02 16:41:50 +02:00
vmwgfx_cmdbuf_res.c drm/vmwgfx: Fix hash key computation 2014-10-31 09:54:22 +01:00
vmwgfx_context.c drm/vmwgfx: Fix compat shader namespace 2014-07-04 12:12:09 +02:00
vmwgfx_dmabuf.c drm/ttm: move fpfn and lpfn into each placement v2 2014-08-27 13:16:04 +02:00
vmwgfx_drv.c drm/vmwgfx: Reorder device takedown somewhat 2015-03-11 11:47:40 -07:00
vmwgfx_drv.h drm/vmwgfx: Replace the hw mutex with a hw spinlock 2015-01-19 03:02:13 -08:00
vmwgfx_execbuf.c drm/vmwgfx: Correctly NULLify dma buffer pointer on failure 2015-03-11 11:47:41 -07:00
vmwgfx_fb.c drm/ttm: move fpfn and lpfn into each placement v2 2014-08-27 13:16:04 +02:00
vmwgfx_fence.c drm/vmwgfx: Replace the hw mutex with a hw spinlock 2015-01-19 03:02:13 -08:00
vmwgfx_fence.h drm/vmwgfx: rework to new fence interface, v2 2014-09-02 16:41:50 +02:00
vmwgfx_fifo.c drm/vmwgfx: Replace the hw mutex with a hw spinlock 2015-01-19 03:02:13 -08:00
vmwgfx_gmr.c drm/vmwgfx: Fix the driver for large dma addresses 2014-01-17 07:44:15 +01:00
vmwgfx_gmrid_manager.c drm/ttm: move fpfn and lpfn into each placement v2 2014-08-27 13:16:04 +02:00
vmwgfx_ioctl.c drm/vmwgfx: Replace the hw mutex with a hw spinlock 2015-01-19 03:02:13 -08:00
vmwgfx_irq.c drm/vmwgfx: Replace the hw mutex with a hw spinlock 2015-01-19 03:02:13 -08:00
vmwgfx_kms.c drm/vmwgfx: Fix a couple of lock dependency violations 2015-03-11 11:47:40 -07:00
vmwgfx_kms.h drm: Pass page flip ioctl flags to driver 2013-08-30 09:24:54 +10:00
vmwgfx_ldu.c drm: Move drm_crtc_init from drm_crtc.h to drm_plane_helper.h 2014-11-05 00:14:55 +01:00
vmwgfx_marker.c drm: vmwgfx: Use nsec based interfaces 2014-07-23 15:01:50 -07:00
vmwgfx_mob.c drm/vmwgfx: avoid null pointer dereference at failure paths 2014-03-02 09:49:59 +01:00
vmwgfx_overlay.c drm/vmwgfx: Make overlay code not require fifo at init time 2012-11-20 16:19:50 +10:00
vmwgfx_prime.c drm/vmwgfx: Hook up the prime ioctls 2013-11-18 04:11:53 -08:00
vmwgfx_reg.h
vmwgfx_resource.c drm/ttm: optionally move duplicates to a separate list 2014-12-03 18:26:52 -05:00
vmwgfx_resource_priv.h drm/vmwgfx: Break out surface and context management to separate files 2012-11-21 07:47:08 +10:00
vmwgfx_scrn.c drm: Move drm_crtc_init from drm_crtc.h to drm_plane_helper.h 2014-11-05 00:14:55 +01:00
vmwgfx_shader.c drm/vmwgfx: (Re)bind shaders to MOBs with the correct offset 2014-12-03 00:48:14 -08:00
vmwgfx_surface.c drm/vmwgfx: Tighten security around surface sharing v2 2014-03-28 14:19:03 +01:00
vmwgfx_ttm_glue.c UAPI: (Scripted) Convert #include "..." to #include <path/...> in drivers/gpu/ 2012-10-02 18:01:07 +01:00