Skip to content
Commit f23cd669 authored by Danilo Krummrich's avatar Danilo Krummrich Committed by Greg Kroah-Hartman
Browse files

drm/nouveau: prime: fix refcount underflow

[ Upstream commit a9bf3efc ]

Calling nouveau_bo_ref() on a nouveau_bo without initializing it (and
hence the backing ttm_bo) leads to a refcount underflow.

Instead of calling nouveau_bo_ref() in the unwind path of
drm_gem_object_init(), clean things up manually.

Fixes: ab9ccb96

 ("drm/nouveau: use prime helpers")
Reviewed-by: default avatarBen Skeggs <bskeggs@nvidia.com>
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarDanilo Krummrich <dakr@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240718165959.3983-2-dakr@kernel.org
(cherry picked from commit 1b93f3e89d03cfc576636e195466a0d728ad8de5)
Signed-off-by: default avatarDanilo Krummrich <dakr@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 1b46b235
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment