[PATCH 2/3] qxl-wddm-dod: Prevent potential memory leak in class driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In case the device initializes 4 memory bars, the driver maps
physical memory of bar 4 and never unmaps it. Fixing it by
immediate unmap of unused memory bars.

Signed-off-by: Yuri Benditovich <yuri.benditovich@xxxxxxxxxx>
---
 qxldod/QxlDod.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/qxldod/QxlDod.cpp b/qxldod/QxlDod.cpp
index bb71f22..6b0cc5e 100755
--- a/qxldod/QxlDod.cpp
+++ b/qxldod/QxlDod.cpp
@@ -3430,6 +3430,8 @@ NTSTATUS QxlDevice::HWInit(PCM_RESOURCE_LIST pResList, DXGK_DISPLAY_INFORMATION*
                             pci_range = QXL_PCI_RANGES;
                             break;
                         default:
+                            DbgPrint(TRACE_LEVEL_WARNING, ("Unused memory range found\n"));
+                            pDxgkInterface->DxgkCbUnmapMemory(pDxgkInterface->DeviceHandle, MemBase);
                             break;
                         }
                     }
-- 
2.7.0.windows.1

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]