If I use dedicated thread which will perform write operations at
PASSIVE_LEVEL, then following problem can arise:
While dedicated thread is reading from a dedicated non-paged memory, it may
get interrupted again by the same interrupt. Interrupt routine can then
overwrite data in dedicated memory. When thread execution is restored it
could end-up writing inconsistent data in the file, that is data from 2nd
interrupt rather than 1st.
If KeSynchronizeInterrupt routiune is used to synchronise read/write
operation, thread IRQL will raise to DISPATCH_LEVEL, but that would cause
another problem becasue file operations can't be performed at DISPATCH_LEVEL.
More help required
"x64" wrote:
> > How can I write to file if my interrupt function is fired? I know can't write
> > to file from an interrupt function because it's running at DIRQL. What's the
> > way around?
>
> Use dedicated thread in conjunction with non-paged buffer for data
> which you want to write.
> .
>