linux/drivers/dma-buf
Gustavo A. R. Silva 683a0e630c dma-buf/udmabuf: Fix NULL pointer dereference in udmabuf_create
There is a potential execution path in which pointer memfd is NULL when
passed as argument to fput(), hence there is a NULL pointer dereference
in fput().

Fix this by null checking *memfd* before calling fput().

Addresses-Coverity-ID: 1473174 ("Explicit null dereferenced")
Fixes: fbb0de7950 ("Add udmabuf misc device")
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20180904190749.GA9308@embeddedor.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2018-09-05 08:28:28 +02:00
..
dma-buf.c dma-buf: Remove requirement for ops->map() from dma_buf_export 2018-08-10 07:57:46 +02:00
dma-fence-array.c dma-fence: Make ->wait callback optional 2018-07-03 13:12:57 +02:00
dma-fence.c dma-fence: Polish kernel-doc for dma-fence.c 2018-07-04 12:18:37 +02:00
Kconfig Add udmabuf misc device 2018-09-03 13:29:38 +02:00
Makefile Add udmabuf misc device 2018-09-03 13:29:38 +02:00
reservation.c dma-buf: Move BUG_ON from _add_shared_fence to _add_shared_inplace 2018-07-16 20:20:37 +05:30
seqno-fence.c dma-buf: Rename struct fence to dma_fence 2016-10-25 14:40:39 +02:00
sw_sync.c dma-fence: Make ->wait callback optional 2018-07-03 13:12:57 +02:00
sync_debug.c Linux 4.13-rc2 2017-07-27 08:15:43 +10:00
sync_debug.h dma-buf: Remove unneeded stubs around sync_debug interfaces 2018-05-07 15:58:07 +02:00
sync_file.c vfs: do bulk POLL* -> EPOLL* replacement 2018-02-11 14:34:03 -08:00
sync_trace.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
udmabuf.c dma-buf/udmabuf: Fix NULL pointer dereference in udmabuf_create 2018-09-05 08:28:28 +02:00