linux/drivers/gpu/drm/tegra
Fedor Pchelkin f33bf922d4 drm/tegra: put drm_gem_object ref on error in tegra_fb_create
[ Upstream commit 32e5a120a5 ]

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>
History 2024-03-26 18:19:50 -04: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 drm/tegra: dp: Add DisplayPort link training helper 2019-10-28 11:18:53 +01:00
dpaux.c drm/tegra: dpaux: Fix PM disable depth imbalance in tegra_dpaux_probe 2024-03-26 18:19:41 -04:00
dpaux.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
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 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
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 drm/tegra: Extract tegra_gem_lookup() 2021-08-10 14:44:31 +02:00
gr2d.c drm/tegra: Enable runtime PM during probe 2023-07-27 18:41:59 +02:00
gr2d.h drm/tegra: gr2d: Add tiled PATBASE address register 2020-07-17 16:06:16 +02:00
gr3d.c drm/tegra: Enable runtime PM during probe 2023-07-27 18:41:59 +02:00
gr3d.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
hda.c drm/tegra: hda: Extract HDA format parsing code 2019-01-16 13:10:20 +01:00
hda.h drm/tegra: hda: Extract HDA format parsing code 2019-01-16 13:10:20 +01:00
hdmi.c drm/tegra: hdmi: Fix some error handling paths in tegra_hdmi_probe() 2024-03-26 18:19:41 -04:00
hdmi.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
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
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
mipi-phy.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
mipi-phy.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
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 drm/tegra: sor: Add DisplayPort support 2019-10-28 11:18:54 +01:00
submit.c drm/tegra: Use tegra_dev_iommu_get_stream_id() 2023-01-27 17:49:43 +01:00
submit.h drm/tegra: Add job firewall 2021-08-10 17:04:05 +02:00
trace.c drm/tegra: dc: Trace register accesses 2017-08-17 17:57:14 +02:00
trace.h drm/tegra: trace: Fix path to include 2017-09-26 11:08:17 +02:00
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 drm/tegra: Don't call SET_APPLICATION_ID in VIC boot 2021-06-11 18:48:36 +02:00