[ivshmem] fixed infinite loop bug
@@ -372,10 +372,13 @@ VOID IVSHMEMEvtDeviceFileCleanup(_In_ WDFFILEOBJECT FileObject)
{
_Analysis_assume_(entry != NULL);
PIVSHMEMEventListEntry event = CONTAINING_RECORD(entry, IVSHMEMEventListEntry, ListEntry);
- PLIST_ENTRY next = entry->Flink;
if (event->owner != FileObject)
+ {
+ entry = entry->Flink;
continue;
+ }
+ PLIST_ENTRY next = entry->Flink;
RemoveEntryList(entry);
ObDereferenceObject(event->event);
event->owner = NULL;
