]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
drm/amdgpu: Fix memory leak in hpd_rx_irq_create_workqueue()
authorRafael Mendonca <rafaelmendsr@gmail.com>
Mon, 12 Sep 2022 22:34:32 +0000 (19:34 -0300)
committerStefan Bader <stefan.bader@canonical.com>
Thu, 24 Nov 2022 13:24:25 +0000 (14:24 +0100)
commit2085dfc1bf5da28cee347eac719497ba27c397b9
tree0682505648b47cb6ccb7080e2ff9abb69690ba44
parentfadda712736e9a250943d37228c335e8e482df1c
drm/amdgpu: Fix memory leak in hpd_rx_irq_create_workqueue()

BugLink: https://bugs.launchpad.net/bugs/1996825
[ Upstream commit 7136f956c73c4ba50bfeb61653dfd6a9669ea915 ]

If construction of the array of work queues to handle hpd_rx_irq offload
work fails, we need to unwind. Destroy all the created workqueues and
the allocated memory for the hpd_rx_irq_offload_work_queue struct array.

Fixes: 8e794421bc98 ("drm/amd/display: Fork thread to offload work of hpd_rx_irq")
Signed-off-by: Rafael Mendonca <rafaelmendsr@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c