linux-stable/drivers/accel
Pranjal Ramajor Asha Kanojiya 8d0d16a3ef accel/qaic: Call DRM helper function to destroy prime GEM
smatch warning:
	drivers/accel/qaic/qaic_data.c:620 qaic_free_object() error:
		dereferencing freed memory 'obj->import_attach'

obj->import_attach is detached and freed using dma_buf_detach().
But used after free to decrease the dmabuf ref count using
dma_buf_put().

drm_prime_gem_destroy() handles this issue and performs the proper clean
up instead of open coding it in the driver.

Fixes: ff13be8303 ("accel/qaic: Add datapath")
Reported-by: Sukrut Bellary <sukrut.bellary@linux.com>
Closes: https://lore.kernel.org/all/20230610021200.377452-1-sukrut.bellary@linux.com/
Suggested-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Pranjal Ramajor Asha Kanojiya <quic_pkanojiy@quicinc.com>
Reviewed-by: Carl Vanderlip <quic_carlv@quicinc.com>
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Signed-off-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230614161528.11710-1-quic_jhugo@quicinc.com
2023-06-20 08:07:29 -06:00
..
habanalabs Driver core changes for 6.4-rc1 2023-04-27 11:53:57 -07:00
ivpu accel/ivpu: Fix sporadic VPU boot failure 2023-06-08 08:17:27 +02:00
qaic accel/qaic: Call DRM helper function to destroy prime GEM 2023-06-20 08:07:29 -06:00
drm_accel.c driver core: class: remove module * from class_create() 2023-03-17 15:16:33 +01:00
Kconfig accel/qaic: Add qaic driver to the build system 2023-04-06 08:23:03 +02:00
Makefile accel/qaic: Add qaic driver to the build system 2023-04-06 08:23:03 +02:00