Skip to content
Commit 2295bd84 authored by Pavel Sakharov's avatar Pavel Sakharov Committed by Christian König
Browse files

dma-buf: Fix NULL pointer dereference in sanitycheck()



If due to a memory allocation failure mock_chain() returns NULL, it is
passed to dma_fence_enable_sw_signaling() resulting in NULL pointer
dereference there.

Call dma_fence_enable_sw_signaling() only if mock_chain() succeeds.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: d62c43a9 ("dma-buf: Enable signaling on fence for selftests")
Signed-off-by: default avatarPavel Sakharov <p.sakharov@ispras.ru>
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240319231527.1821372-1-p.sakharov@ispras.ru
parent 9cbd1dae
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment