Fixing possible BSOD
Interrupts seem to arrive to the driver before the initialization phase is over (m_pHWDevice = NULL), in that case we can't handle interrupts yet. Even when m_pHWDevice isn't NULL, other fields aren't necessarily fully initialized till the StartDevice function has finished initialization, thus the flag DriverStarted should be checked upon interrupts. Note: There is no way provided by Microsoft to disable interrupts in WDDM drivers. Signed-off-by: Sameeh Jubran <sameeh@daynix.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
This commit is contained in:
parent
f6e099db39
commit
f87019cb01
@ -63,6 +63,7 @@ QxlDod::QxlDod(_In_ DEVICE_OBJECT* pPhysicalDeviceObject) : m_pPhysicalDevice(pP
|
||||
{
|
||||
DbgPrint(TRACE_LEVEL_INFORMATION, ("---> %s\n", __FUNCTION__));
|
||||
*((UINT*)&m_Flags) = 0;
|
||||
m_Flags.DriverStarted = FALSE;
|
||||
RtlZeroMemory(&m_DxgkInterface, sizeof(m_DxgkInterface));
|
||||
RtlZeroMemory(&m_DeviceInfo, sizeof(m_DeviceInfo));
|
||||
RtlZeroMemory(m_CurrentModes, sizeof(m_CurrentModes));
|
||||
@ -1677,7 +1678,10 @@ VOID QxlDod::DpcRoutine(VOID)
|
||||
BOOLEAN QxlDod::InterruptRoutine(_In_ ULONG MessageNumber)
|
||||
{
|
||||
DbgPrint(TRACE_LEVEL_INFORMATION, ("<--> 0 %s\n", __FUNCTION__));
|
||||
if (m_Flags.DriverStarted && m_pHWDevice) {
|
||||
return m_pHWDevice->InterruptRoutine(&m_DxgkInterface, MessageNumber);
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
VOID QxlDod::ResetDevice(VOID)
|
||||
|
Loading…
Reference in New Issue
Block a user