Author: janderwald
Date: Sun Feb 8 08:11:51 2015
New Revision: 66203
URL:
http://svn.reactos.org/svn/reactos?rev=66203&view=rev
Log:
[PORTCLS]
- fix crash / assert triggered with cwawdm driver
- fix irp leak
- CORE 7822
Modified:
trunk/reactos/drivers/wdm/audio/backpln/portcls/irpstream.cpp
trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavepci.cpp
Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/irpstream.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/backpln/portcls/irpstream.cpp [iso-8859-1] (original)
+++ trunk/reactos/drivers/wdm/audio/backpln/portcls/irpstream.cpp [iso-8859-1] Sun Feb 8
08:11:51 2015
@@ -552,6 +552,7 @@
{
// no irp available
m_OutOfMapping = TRUE;
+ DPRINT("GetMappingWithTag no mapping available\n");
return STATUS_NOT_FOUND;
}
@@ -611,6 +612,7 @@
StreamData->CurStreamHeader =
(PKSSTREAM_HEADER)((ULONG_PTR)StreamData->CurStreamHeader +
StreamData->CurStreamHeader->Size);
}
+ DPRINT("GetMappingWithTag Tag %p Buffer %p Flags %lu ByteCount %lx\n", Tag,
VirtualAddress, *Flags, *ByteCount);
// done
return STATUS_SUCCESS;
}
@@ -654,6 +656,12 @@
// remove irp from used list
CurEntry = ExInterlockedRemoveHeadList(&m_FreeIrpList, &m_IrpListLock);
+ if (CurEntry == NULL)
+ {
+ // this should not happen
+ DPRINT("ReleaseMappingWithTag Tag %p not found\n", Tag);
+ return STATUS_NOT_FOUND;
+ }
// sanity check
PC_ASSERT(CurEntry);
@@ -743,6 +751,11 @@
// complete the request
IoCompleteRequest(Irp, IO_SOUND_INCREMENT);
}
+ else
+ {
+ // there are still some headers not consumed
+ ExInterlockedInsertHeadList(&m_FreeIrpList,
&Irp->Tail.Overlay.ListEntry, &m_IrpListLock);
+ }
return STATUS_SUCCESS;
}
Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavepci.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavepci.cpp [iso-8859-1]
(original)
+++ trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavepci.cpp [iso-8859-1] Sun Feb
8 08:11:51 2015
@@ -228,7 +228,7 @@
IN PRESOURCELIST ResourceList)
{
IMiniportWavePci * Miniport;
- PSERVICEGROUP ServiceGroup;
+ PSERVICEGROUP ServiceGroup = 0;
NTSTATUS Status;
PPINCOUNT PinCount;
PPOWERNOTIFY PowerNotify;