Commit c40cd24b authored by Michael Kelley's avatar Michael Kelley Committed by Greg Kroah-Hartman
Browse files

drm/hyperv: Fix address space leak when Hyper-V DRM device is removed



[ Upstream commit aed70935 ]

When a Hyper-V DRM device is probed, the driver allocates MMIO space for
the vram, and maps it cacheable. If the device removed, or in the error
path for device probing, the MMIO space is released but no unmap is done.
Consequently the kernel address space for the mapping is leaked.

Fix this by adding iounmap() calls in the device removal path, and in the
error path during device probing.

Fixes: f1f63cbb ("drm/hyperv: Fix an error handling path in hyperv_vmbus_probe()")
Fixes: a0ab5abc ("drm/hyperv : Removing the restruction of VRAM allocation with PCI bar size")
Signed-off-by: default avatarMichael Kelley <mhklinux@outlook.com>
Reviewed-by: default avatarSaurabh Sengar <ssengar@linux.microsoft.com>
Tested-by: default avatarSaurabh Sengar <ssengar@linux.microsoft.com>
Link: https://lore.kernel.org/r/20250210193441.2414-1-mhklinux@outlook.com


Signed-off-by: default avatarWei Liu <wei.liu@kernel.org>
Message-ID: <20250210193441.2414-1-mhklinux@outlook.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 486033f5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment