linux-stable/drivers/gpu/drm/vmwgfx
Eric Engestrom b3c11ac267 drm: move allocation out of drm_get_format_name()
The function's behaviour was changed in 90844f0004, without changing
its signature, causing people to keep using it the old way without
realising they were now leaking memory.
Rob Clark also noticed it was also allocating GFP_KERNEL memory in
atomic contexts, breaking them.

Instead of having to allocate GFP_ATOMIC memory and fixing the callers
to make them cleanup the memory afterwards, let's change the function's
signature by having the caller take care of the memory and passing it to
the function.
The new parameter is a single-field struct in order to enforce the size
of its buffer and help callers to correctly manage their memory.

Fixes: 90844f0004 ("drm: make drm_get_format_name thread-safe")
Cc: Rob Clark <robdclark@gmail.com>
Cc: Christian König <christian.koenig@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Acked-by: Rob Clark <robdclark@gmail.com>
Acked-by: Sinclair Yeh <syeh@vmware.com> (vmwgfx)
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20161112011309.9799-1-eric@engestrom.ch
2016-11-12 14:19:38 +01:00
..
device_include drm/vmwgfx: remove userland definition of DIV_ROUND_UP 2016-03-04 16:10:36 -05:00
Kconfig drm/vmwgfx: select CONFIG_FB 2016-08-12 10:41:46 +02:00
Makefile drm/vmwgfx: Report vmwgfx version to vmware.log 2016-05-20 17:40:07 +02:00
vmwgfx_binding.c
vmwgfx_binding.h
vmwgfx_buffer.c drm/ttm: make eviction decision a driver callback v2 2016-10-25 14:44:04 -04:00
vmwgfx_cmdbuf.c drm/vmwgfx: use *_32_bits() macros 2016-06-15 13:10:38 +02:00
vmwgfx_cmdbuf_res.c
vmwgfx_context.c
vmwgfx_cotable.c drm/ttm: remove lazy parameter from ttm_bo_wait 2016-05-04 20:21:26 -04:00
vmwgfx_dmabuf.c drm/vmwgfx: Check pin count before attempting to move a buffer 2016-07-01 10:47:50 -07:00
vmwgfx_drv.c drm/vmwgfx: Replace numeric parameter like 0444 with macro 2016-10-10 11:14:20 -07:00
vmwgfx_drv.h Merge branch 'drm-vmwgfx-fixes' of ssh://people.freedesktop.org/~syeh/repos_linux into drm-fixes 2016-10-21 13:26:58 +10:00
vmwgfx_execbuf.c drm/vmwgfx: Avoid validating views on view destruction 2016-10-10 11:15:05 -07:00
vmwgfx_fb.c drm/vmwgfx: Fix error paths when mapping framebuffer 2016-07-08 08:30:35 -07:00
vmwgfx_fence.c dma-buf: Rename struct fence to dma_fence 2016-10-25 14:40:39 +02:00
vmwgfx_fence.h dma-buf: Rename struct fence to dma_fence 2016-10-25 14:40:39 +02:00
vmwgfx_fifo.c drm/vmwgfx: fix a warning message 2015-11-26 17:40:00 +01:00
vmwgfx_gmr.c
vmwgfx_gmrid_manager.c
vmwgfx_ioctl.c drm/vmwgfx: Replace iowrite/ioread with volatile memory accesses 2015-11-02 00:16:05 -08:00
vmwgfx_irq.c drm/vmwgfx: Relax irq locking somewhat 2015-11-06 16:15:40 +01:00
vmwgfx_kms.c drm: move allocation out of drm_get_format_name() 2016-11-12 14:19:38 +01:00
vmwgfx_kms.h drm/core: Change declaration for gamma_set. 2016-06-07 15:30:09 +02:00
vmwgfx_ldu.c drm/kms: Nuke dirty_info property 2016-08-16 16:30:50 +02:00
vmwgfx_marker.c
vmwgfx_mob.c drm/ttm: remove use_ticket parameter from ttm_bo_reserve 2016-05-04 20:21:21 -04:00
vmwgfx_msg.c drm/vmwgfx: Add a check to handle host message failure 2016-07-01 10:47:47 -07:00
vmwgfx_msg.h drm/vmwgfx: Add VMWare host messaging capability 2016-05-20 17:12:33 +02:00
vmwgfx_overlay.c
vmwgfx_prime.c
vmwgfx_reg.h
vmwgfx_resource.c dma-buf: Rename struct fence to dma_fence 2016-10-25 14:40:39 +02:00
vmwgfx_resource_priv.h
vmwgfx_scrn.c drm/kms: Nuke dirty_info property 2016-08-16 16:30:50 +02:00
vmwgfx_shader.c drm/ttm: remove use_ticket parameter from ttm_bo_reserve 2016-05-04 20:21:21 -04:00
vmwgfx_so.c
vmwgfx_so.h
vmwgfx_stdu.c drm/kms: Nuke dirty_info property 2016-08-16 16:30:50 +02:00
vmwgfx_surface.c drm/vmwgfx: Adjust checks for null pointers in 13 functions 2016-10-10 13:23:16 -07:00
vmwgfx_ttm_glue.c