qxl-wddm-dod: Fix unmapping of physical memory
https://bugzilla.redhat.com/show_bug.cgi?id=1454866 Due to wrong addresses passed to class driver, it never does unmapping of physical memory, causing a leak of virtual address range. On x86 systems the device fails to start due to failure to map physical memory range after 10-50 cycles of disable-enable. Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
This commit is contained in:
parent
1a81d6d31f
commit
9b55ed7041
@ -3551,24 +3551,24 @@ void QxlDevice::UnmapMemory(void)
|
|||||||
PDXGKRNL_INTERFACE pDxgkInterface = m_pQxlDod->GetDxgkInterface();
|
PDXGKRNL_INTERFACE pDxgkInterface = m_pQxlDod->GetDxgkInterface();
|
||||||
if (m_IoMapped && m_IoBase)
|
if (m_IoMapped && m_IoBase)
|
||||||
{
|
{
|
||||||
pDxgkInterface->DxgkCbUnmapMemory( pDxgkInterface->DeviceHandle, &m_IoBase);
|
pDxgkInterface->DxgkCbUnmapMemory( pDxgkInterface->DeviceHandle, m_IoBase);
|
||||||
}
|
}
|
||||||
m_IoBase = NULL;
|
m_IoBase = NULL;
|
||||||
if (m_RomHdr)
|
if (m_RomHdr)
|
||||||
{
|
{
|
||||||
pDxgkInterface->DxgkCbUnmapMemory( pDxgkInterface->DeviceHandle, &m_RomHdr);
|
pDxgkInterface->DxgkCbUnmapMemory( pDxgkInterface->DeviceHandle, m_RomHdr);
|
||||||
m_RomHdr = NULL;
|
m_RomHdr = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_RamStart)
|
if (m_RamStart)
|
||||||
{
|
{
|
||||||
pDxgkInterface->DxgkCbUnmapMemory( pDxgkInterface->DeviceHandle, &m_RamStart);
|
pDxgkInterface->DxgkCbUnmapMemory( pDxgkInterface->DeviceHandle, m_RamStart);
|
||||||
m_RamStart = NULL;
|
m_RamStart = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_VRamStart)
|
if (m_VRamStart)
|
||||||
{
|
{
|
||||||
pDxgkInterface->DxgkCbUnmapMemory( pDxgkInterface->DeviceHandle, &m_VRamStart);
|
pDxgkInterface->DxgkCbUnmapMemory( pDxgkInterface->DeviceHandle, m_VRamStart);
|
||||||
m_VRamStart = NULL;
|
m_VRamStart = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user