Win2000 driver: DeviceIoControl, system threads and addressibility

Hello,

In my w2k driver I have a DeviceIoControl struct like:

typedef struct {

ULONG Length;
PUCHAR Buffer;

} REQUEST, *PREQUEST;

I am using Buffered I/O.

If I use the Startio approach, I have addressibility to the “Buffer”
field. However, now I have eliminated the Startio and implemented the
notion of an Irp queue with a system thread dequeuing the next Irp and
initiating the hardware with a new request (the Ioctl Dispatch function is
the producer for this Irp queue). When the system thread (Irp queue
consumer) attemps to access “Buffer” I get a BSOD with a Bugcheck 0x1E and
an exception code of 0xc0000005 (SATUS_ACCESS_VIOLATION). I understand
that “Buffer” is no longer mapped for the thread. Question how can I
insure that “Buffer” is mapped for the consuming thread?

Thanks and regards, Vasili