drm/omap
Thierry Reding 508a5f77fa omap: Initialize DMA BUF file descriptor to -1
Commit c86dabfc9f ("omap: zero is a valid fd number, treat it as
such") corrected checks for valid file descriptors, but the OMAP buffer
object code initializes the DMA-BUF file descriptor to 0 (as a result of
calloc()'ing the structure). Obviously this isn't going to work because
subsequent code will try to use file descriptor 0 (most likely stdin at
that point) as a DMA-BUF. It may also try and close stdin when a buffer
object is destroyed.

Fix this by initializing the DMA-BUF file descriptor to -1, properly
marking it as an invalid file descriptor.

Fixes: c86dabfc9f ("omap: zero is a valid fd number, treat it as such")
Reported-by: Robert Nelson <robertcnelson@gmail.com>
Tested-by: Robert Nelson <robertcnelson@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2015-08-26 15:15:54 +02:00
..
Makefile.am drm: remove no longer needed VISIBILITY_CFLAGS 2015-04-28 11:19:15 +01:00
libdrm_omap.pc.in omap: add omapdrm support 2012-03-28 23:00:14 +02:00
omap-symbol-check omap: add symbols test 2015-04-28 11:19:15 +01:00
omap_drm.c omap: Initialize DMA BUF file descriptor to -1 2015-08-26 15:15:54 +02:00
omap_drm.h omap: include omap_drm.h independently 2012-08-23 14:21:01 -05:00
omap_drmif.h omap: add refcnting and handle tracking 2012-07-13 16:18:25 -05:00