Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dma-buf: Fix NULL pointer dereference in sanitycheck()
[ Upstream commit 2295bd8 ] 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: d62c43a ("dma-buf: Enable signaling on fence for selftests") Signed-off-by: Pavel Sakharov <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Christian König <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Sasha Levin <[email protected]>
- Loading branch information