Details
-
Bug
-
Resolution: Fixed
-
Major
-
None
-
VirtualBox 7.0.10 with our inbuilt AC97 driver used.
Description
When calling KsReadFile or KsWriteFile functions from our Kernel Streaming driver (ks.sys), they are not functioning as expected. After the call is performed, an assert from KspDispatchIrp is appearing, as visisble in ks.log:
*** Assertion failed: IoStack->FileObject
|
*** Source File: ../drivers/ksfilter/ks/irp.c, line 1971 |
Break repeatedly, break Once, Ignore, terminate Process or terminate Thread (boipt)? |
The reasons why it's happening are, we actually 1) don't finish IRP initialization correctly (don't fill the rest of its data besides the one is initialized by IoBuildSynchronousFsdRequest), 2) don't setup the appropriate IO_STACK_LOCATION structure for the IRP, before calling the driver's read/write routine.
Therefore, to fix this problem, we need to do all these things (those are described above).
I'm going to fix this, and will open a new PR soon.
I can confirm: after my changes, the issue is fixed, and these functions are working correctly, as expected.
Discovered this during my audio investigations.