]> git.baikalelectronics.ru Git - kernel.git/commit
drm/hyperv: Fix device removal on Gen1 VMs
authorMohammed Gamal <mgamal@redhat.com>
Fri, 19 Nov 2021 11:29:00 +0000 (12:29 +0100)
committerDeepak Rawat <drawat.floss@gmail.com>
Tue, 23 Nov 2021 18:56:12 +0000 (10:56 -0800)
commit0c8fa2a8fcc408e2cba93541016b20c9f9a960d8
treeea2dd2b5eae21cd8a1369b64e1601924ee5d1587
parenta6f958870f0c50daaba668027c2aa22d92da785c
drm/hyperv: Fix device removal on Gen1 VMs

The Hyper-V DRM driver tries to free MMIO region on removing
the device regardless of VM type, while Gen1 VMs don't use MMIO
and hence causing the kernel to crash on a NULL pointer dereference.

Fix this by making deallocating MMIO only on Gen2 machines and implement
removal for Gen1

Fixes: 858fc26d11bc ("drm/hyperv: Add DRM driver for hyperv synthetic video device")
Signed-off-by: Mohammed Gamal <mgamal@redhat.com>
Reviewed-by: Deepak Rawat <drawat.floss@gmail.com>
Signed-off-by: Deepak Rawat <drawat.floss@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211119112900.300537-1-mgamal@redhat.com
drivers/gpu/drm/hyperv/hyperv_drm_drv.c