summary refs log tree commit diff
path: root/Documentation
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@linaro.org>2023-07-06 15:37:51 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-08-03 10:24:19 +0200
commitc3d576baa6c8f0b34750a0b6f9b12e9d64625512 (patch)
tree373f94e0c75bb80b6bac1de6421491fc9feb6908 /Documentation
parent23acc2b850ba4dfdfe2700d728be3e27710260a1 (diff)
downloadlinux-c3d576baa6c8f0b34750a0b6f9b12e9d64625512.tar.gz
dma-buf: fix an error pointer vs NULL bug
commit 00ae1491f970acc454be0df63f50942d94825860 upstream.

Smatch detected potential error pointer dereference.

    drivers/gpu/drm/drm_syncobj.c:888 drm_syncobj_transfer_to_timeline()
    error: 'fence' dereferencing possible ERR_PTR()

The error pointer comes from dma_fence_allocate_private_stub().  One
caller expected error pointers and one expected NULL pointers.  Change
it to return NULL and update the caller which expected error pointers,
drm_syncobj_assign_null_handle(), to check for NULL instead.

Fixes: f781f661e8c9 ("dma-buf: keep the signaling time of merged fences v3")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Sumit Semwal <sumit.semwal@linaro.org>
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/b09f1996-3838-4fa2-9193-832b68262e43@moroto.mountain
Cc: Jindong Yue <jindong.yue@nxp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'Documentation')
0 files changed, 0 insertions, 0 deletions