OpenCloudOS-Kernel/drivers/gpu/drm/tegra
Fedor Pchelkin f33bf922d4 drm/tegra: put drm_gem_object ref on error in tegra_fb_create
[ Upstream commit 32e5a120a5105bce01561978ee55aee8e40ac0dc ]

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: de2ba664c3 ("gpu: host1x: drm: Add memory manager and fb")
Signed-off-by: Fedor Pchelkin <pchelkin@ispras.ru>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231215093356.12067-1-pchelkin@ispras.ru
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-26 18:19:50 -04:00
..
Kconfig fbdev: Use _DMAMEM_ infix for DMA-memory helpers 2023-07-31 20:07:18 +02:00
Makefile drm/tegra: Hide fbdev support behind config option 2023-04-06 12:18:54 +02:00
dc.c drm: Explicitly include correct DT includes 2023-07-21 09:12:43 +02:00
dc.h drm/tegra: rgb: Make tegra_dc_rgb_remove() return void 2023-04-04 14:24:40 +02:00
dp.c drm: Rename dp/ to display/ 2022-04-25 11:17:45 +02:00
dp.h
dpaux.c drm/tegra: dpaux: Fix PM disable depth imbalance in tegra_dpaux_probe 2024-03-26 18:19:41 -04:00
dpaux.h
drm.c drm/tegra: Remove existing framebuffer only if we support display 2024-03-06 14:48:38 +00:00
drm.h drm/tegra: Implement fbdev emulation as in-kernel client 2023-04-06 12:18:56 +02:00
dsi.c drm/tegra: dsi: Fix missing pm_runtime_disable() in the error handling path of tegra_dsi_probe() 2024-03-26 18:19:41 -04:00
dsi.h
falcon.c drm/tegra: falcon: Set DMACTX field on DMA transactions 2022-07-08 16:27:52 +02:00
falcon.h drm/tegra: falcon: Set DMACTX field on DMA transactions 2022-07-08 16:27:52 +02:00
fb.c drm/tegra: put drm_gem_object ref on error in tegra_fb_create 2024-03-26 18:19:50 -04:00
fbdev.c fbdev: Use _DMAMEM_ infix for DMA-memory helpers 2023-07-31 20:07:18 +02:00
firewall.c drm/tegra: firewall: Check for is_addr_reg existence in IMM check 2023-01-26 15:55:38 +01:00
gem.c drm: Don't assert held reservation lock for dma-buf mmapping 2023-06-21 20:22:20 +03:00
gem.h
gr2d.c drm/tegra: Enable runtime PM during probe 2023-07-27 18:41:59 +02:00
gr2d.h
gr3d.c drm/tegra: Enable runtime PM during probe 2023-07-27 18:41:59 +02:00
gr3d.h
hda.c
hda.h
hdmi.c drm/tegra: hdmi: Fix some error handling paths in tegra_hdmi_probe() 2024-03-26 18:19:41 -04:00
hdmi.h
hub.c drm: Explicitly include correct DT includes 2023-07-21 09:12:43 +02:00
hub.h drm/tegra: Remove duplicate struct declaration 2021-12-16 14:07:07 +01:00
mipi-phy.c
mipi-phy.h
nvdec.c drm/tegra: Enable runtime PM during probe 2023-07-27 18:41:59 +02:00
output.c drm/tegra: output: Fix missing i2c_put_adapter() in the error handling paths of tegra_output_probe() 2024-03-26 18:19:42 -04:00
plane.c drm/tegra: plane: Improve use of dev_err_probe() 2023-04-04 18:04:57 +02:00
plane.h drm/tegra: Support semi-planar formats on Tegra114+ 2022-03-01 11:13:09 +01:00
rgb.c drm/tegra: rgb: Fix missing clk_put() in the error handling paths of tegra_dc_rgb_probe() 2024-03-26 18:19:42 -04:00
riscv.c drm/tegra: Add code for booting RISC-V based engines 2022-11-25 16:14:58 +01:00
riscv.h drm/tegra: Add code for booting RISC-V based engines 2022-11-25 16:14:58 +01:00
sor.c drm/tegra: sor: Convert to devm_platform_ioremap_resource() 2023-07-27 18:41:59 +02:00
sor.h
submit.c drm/tegra: Use tegra_dev_iommu_get_stream_id() 2023-01-27 17:49:43 +01:00
submit.h
trace.c
trace.h
uapi.c gpu: host1x: Select context device based on attached IOMMU 2022-11-25 16:14:19 +01:00
uapi.h drm/tegra: Implement correct DMA-BUF semantics 2021-12-16 14:07:06 +01:00
vic.c drm/tegra: Enable runtime PM during probe 2023-07-27 18:41:59 +02:00
vic.h