Skip to content
Commit 240c4f11 authored by Fedor Pchelkin's avatar Fedor Pchelkin Committed by Sasha Levin
Browse files

drm/tegra: put drm_gem_object ref on error in tegra_fb_create



[ Upstream commit 32e5a120 ]

Inside tegra_fb_create(), drm_gem_object_lookup() increments ref count of
the found object. But if the following size check fails then the last
found object's ref count should be put there as the unreferencing loop
can't detect this situation.

Found by Linux Verification Center (linuxtesting.org).

Fixes: de2ba664 ("gpu: host1x: drm: Add memory manager and fb")
Signed-off-by: default avatarFedor Pchelkin <pchelkin@ispras.ru>
Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231215093356.12067-1-pchelkin@ispras.ru


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 3f8445f1
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