page fault when send queued irp to a lower level driver

Hi all,

In the filter driver, I queue file system requests in a queue maintained by
the driver.

My problem is that at a later time that after I move the IRP from the queue
and send it down to lower level driver, sometime it lead to page fault.
Before IoCallDriver, I have setup an IoCompletion routine. The page fault
happen before that routine is called.

My question is “Does Process Context matter?” when I send the IRP down. Or
are there other possible causes. I always allocate memory in NonPaged
pool.
Right now, I am using SoftIce with one computer setup, page fault message
is all I got. Will other setup give me more information ?

Apparently a newbie question, but I am really clueless right now !

Thanx,

Jack Cheng
(Curriculum Corp.)

Sorry and allow me to rephrase my question again because I feel the
generous response I got misinterpret my question.

In a file system filter driver, I intercept IRP_MJ_CREATE requests and
queue it in an driver maintained queue, then
Irp->IoStatus.Status = STATUS_PENDING;
IoMarkIrpPending(Irp);

Then I de-queue an service IRP setup by an User mode service, send the
necessary information to it to process.

After the service finished its task, it send the result back to the filter
driver. It is at this point I dequeue the original IRP_MJ_CREATE request
and do the following as in what in Rajeev Nagar’s sfilter sample,

IoCopyCurrentIrpStackLocationToNext(Irp);
…get pointer to extension
…set a completion routine
…find target object from extension

then

IoCallDriver(pTargetDeviceObject, Irp);

If the call return back from IoCallDriver, then everything is fine.
Otherwise, I got page fault in SoftIce and this happen before the
completion routine get called.

My understanding is that Irp is allocated in NonPage space, I also do all
my allocation in NonPage space. So my question is what caused this page
fault in lower level driver. Is it because I handle the above in different
process context ? If yes, is there a way to switch to that context ?

Or is there other thing I miss that the lower level driver is expecting me
to comply ?

I would appreciate any help that I can get and hopefully it is more clear
in regard to the problem than my previous post !

Thanx,

Jack Cheng
(Curriculum Corp.)

I suspect that you can not queue the IPR_MJ_CREATE IRP to a worker thread
because the create call MUST be processed by the FSD in the context of the
calling process.

Just a thought, I have not verified this.

Jamey

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of xxxxx@erinet.com
Sent: Wednesday, April 26, 2000 12:15 PM
To: File Systems Developers
Subject: [ntfsd] Re: page fault when send queued irp to a lower level
driver

Sorry and allow me to rephrase my question again because I feel the
generous response I got misinterpret my question.

In a file system filter driver, I intercept IRP_MJ_CREATE requests and
queue it in an driver maintained queue, then
Irp->IoStatus.Status = STATUS_PENDING;
IoMarkIrpPending(Irp);

Then I de-queue an service IRP setup by an User mode service, send the
necessary information to it to process.

After the service finished its task, it send the result back to
the filter
driver. It is at this point I dequeue the original IRP_MJ_CREATE request
and do the following as in what in Rajeev Nagar’s sfilter sample,

IoCopyCurrentIrpStackLocationToNext(Irp);
…get pointer to extension
…set a completion routine
…find target object from extension

then

IoCallDriver(pTargetDeviceObject, Irp);

If the call return back from IoCallDriver, then everything is fine.
Otherwise, I got page fault in SoftIce and this happen before the
completion routine get called.

My understanding is that Irp is allocated in NonPage space, I also do all
my allocation in NonPage space. So my question is what caused this page
fault in lower level driver. Is it because I handle the above in
different
process context ? If yes, is there a way to switch to that context ?

Or is there other thing I miss that the lower level driver is
expecting me
to comply ?

I would appreciate any help that I can get and hopefully it is more clear
in regard to the problem than my previous post !

Thanx,

Jack Cheng
(Curriculum Corp.)


You are currently subscribed to ntfsd as: xxxxx@storagecraft.com
To unsubscribe send a blank email to $subst(‘Email.Unsub’)