linux-stable/drivers/gpu/drm/tegra
Thierry Reding 6f530e22fd drm/tegra: gem: Do not try to dereference ERR_PTR()
[ Upstream commit cb7e1abc2c ]

When mapping the DMA-BUF attachment fails, map->sgt will be an ERR_PTR-
encoded error code and the cleanup code would try to free that memory,
which obviously would fail.

Zero out that pointer after extracting the error code when this happens
so that kfree() can do the right thing.

Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-06-09 10:25:24 +02:00
..
dc.c drm/tegra: dc: Support OPP and SoC core voltage scaling 2021-12-16 14:07:07 +01:00
dc.h drm/tegra: dc: Support OPP and SoC core voltage scaling 2021-12-16 14:07:07 +01:00
dp.c drm/dp: Fix OOB read when handling Post Cursor2 register 2022-04-08 13:58:12 +02:00
dp.h
dpaux.c drm/tegra: dpaux: Populate AUX bus 2022-02-23 13:00:37 +01:00
dpaux.h
drm.c drm/tegra: Add back arm_iommu_detach_device() 2021-12-16 14:30:45 +01:00
drm.h drm/tegra: Add NVDEC driver 2021-12-16 14:07:06 +01:00
dsi.c drm/tegra: Fix reference leak in tegra_dsi_ganged_probe 2022-04-08 13:58:12 +02:00
dsi.h
falcon.c drm/tegra: Fix cast to restricted __le32 2022-02-17 07:32:57 +01:00
falcon.h
fb.c drm/tegra: Use fourcc_mod_is_vendor() helper 2021-08-16 12:19:21 +02:00
firewall.c drm/tegra: Add job firewall 2021-08-10 17:04:05 +02:00
gem.c drm/tegra: gem: Do not try to dereference ERR_PTR() 2022-06-09 10:25:24 +02:00
gem.h drm/tegra: Extract tegra_gem_lookup() 2021-08-10 14:44:31 +02:00
gr2d.c drm/tegra: Consolidate runtime PM management of older UAPI codepath 2021-12-16 14:07:08 +01:00
gr2d.h
gr3d.c drm/tegra: Consolidate runtime PM management of older UAPI codepath 2021-12-16 14:07:08 +01:00
gr3d.h
hda.c
hda.h
hdmi.c drm/tegra: hdmi: Add OPP support 2021-12-16 14:07:07 +01:00
hdmi.h
hub.c drm/tegra: hub: Implement basic scaling support 2021-05-31 14:30:11 +02:00
hub.h drm/tegra: Remove duplicate struct declaration 2021-12-16 14:07:07 +01:00
Kconfig drm/tegra: dpaux: Populate AUX bus 2022-02-23 13:00:37 +01:00
Makefile drm/tegra: Add NVDEC driver 2021-12-16 14:07:06 +01:00
mipi-phy.c
mipi-phy.h
nvdec.c drm/tegra: Consolidate runtime PM management of older UAPI codepath 2021-12-16 14:07:08 +01:00
output.c drm/tegra: sor: Fix AUX device reference leak 2021-05-27 20:11:13 +02:00
plane.c drm/tegra: Propagate errors from drm_gem_plane_helper_prepare_fb() 2021-12-16 14:07:06 +01:00
plane.h drm/tegra: Implement correct DMA-BUF semantics 2021-12-16 14:07:06 +01:00
rgb.c drm/tegra: dc: rgb: Allow changing PLLD rate on Tegra30+ 2021-12-16 14:07:07 +01:00
sor.c drm/tegra: sor: Fix AUX device reference leak 2021-05-27 20:11:13 +02:00
sor.h
submit.c drm/tegra: submit: Remove pm_runtime_enabled() checks 2021-12-16 14:07:08 +01:00
submit.h drm/tegra: Add job firewall 2021-08-10 17:04:05 +02:00
trace.c
trace.h
uapi.c drm/tegra: Implement buffer object cache 2021-12-16 14:07:06 +01:00
uapi.h drm/tegra: Implement correct DMA-BUF semantics 2021-12-16 14:07:06 +01:00
vic.c drm/tegra: Consolidate runtime PM management of older UAPI codepath 2021-12-16 14:07:08 +01:00
vic.h drm/tegra: Don't call SET_APPLICATION_ID in VIC boot 2021-06-11 18:48:36 +02:00