2 filter driver device extension

Hi all,

I’m facing a strange problem regarding my filter driver device.

I’ve a disk filter driver for some of my virtual scsi disk devices.
Now while processing the IO requests in my FilterIoThread function sometimes
the filter driver device extension comes as a wrong one. And thats why when
I try to use the data through the wrong device extension pointer I get wrong
data which is crashing my system.

Now, for information, I create the FilterIOThread at the beginning while
starting the filter device. And I am trying to use this single filter driver
for filtering my multiple virtual scsi disk device.

Have you anytime encountered this kind of problem ? Or do you have any
suggestion regarding this problem ?

Thanks in Advance

Somsubhra Raj

When you say the wrong extension, do you mean it is an extension for another device object that you created? Or a device extension for some device object created by another driver?

d
– I can spell, I just can’t type.
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Somsubhra Raj
Sent: Friday, June 16, 2006 4:30 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] 2 filter driver device extension

Hi all,
?
I’m facing a strange problem regarding my filter driver device.
?
I’ve a disk filter driver for some of my virtual scsi disk devices.
Now while processing the IO requests in my FilterIoThread function sometimes the filter driver device extension comes as a wrong one. And thats why when I try to use the data through the wrong device extension pointer I get wrong data which is crashing my system.
?
Now, for information,?I create the FilterIOThread at the beginning while starting the filter device. And I am trying to use this single filter?driver for filtering my multiple virtual scsi disk device.
?
Have you anytime encountered this kind of problem ? Or do you have any suggestion regarding this problem ?
?
Thanks in Advance
?
Somsubhra Raj
— Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Hi Doron,

I cant make out the wrong device extension pointer is of which device.
However if I try to access the members of the structure it works. For
example I’ve implemented a FIFO list, and I can insert or remove objects
from the list. So, it looks like a duplicate copy of the device extension I
wish to use.

However this perplexed me as I have only one disk filter driver, and for
requests previous to it I have access & and could process the correct device
extension.

For your information I’m trying to use this single disk filter driver to
filter out requests for multiple virtual disk devices.

Thanks
Som

On 6/16/06, Doron Holan wrote:
>
> When you say the wrong extension, do you mean it is an extension for
> another device object that you created? Or a device extension for some
> device object created by another driver?
>
> d
> – I can spell, I just can’t type.
> From: xxxxx@lists.osr.com [mailto:
> xxxxx@lists.osr.com] On Behalf Of Somsubhra Raj
> Sent: Friday, June 16, 2006 4:30 AM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] 2 filter driver device extension
>
> Hi all,
>
> I’m facing a strange problem regarding my filter driver device.
>
> I’ve a disk filter driver for some of my virtual scsi disk devices.
> Now while processing the IO requests in my FilterIoThread function
> sometimes the filter driver device extension comes as a wrong one. And thats
> why when I try to use the data through the wrong device extension pointer I
> get wrong data which is crashing my system.
>
> Now, for information,I create the FilterIOThread at the beginning while
> starting the filter device. And I am trying to use this single filterdriver
> for filtering my multiple virtual scsi disk device.
>
> Have you anytime encountered this kind of problem ? Or do you have any
> suggestion regarding this problem ?
>
> Thanks in Advance
>
> Somsubhra Raj
> — Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List
> Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>

I am confused. How do you know it is the wrong device extension pointer/wrong device object? Casting the extension to your structure may give the illusion that it works, but if it is someone else’s device, it will blow up fast.

Remember, you have one driver but that driver may create *many* device objects. How many times is your AddDevice routine called?

To see who created the device object, run !devstack <pdevice_object pointer value> and then look to the right under the !drvobj column, see http://blogs.msdn.com/doronh/archive/2006/03/15/552301.aspx for an example.

d

– I can spell, I just can’t type.
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Somsubhra Raj
Sent: Monday, June 19, 2006 4:38 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] 2 filter driver device extension

Hi Doron,
?
I cant make out the wrong device extension pointer is of which device. However if I try to access the members of the structure it works. For example I’ve implemented a FIFO list, and I can insert or remove objects from the list. So, it looks like a duplicate copy of the device extension I wish to use.
?
However this perplexed me as I have only one disk filter driver, and for requests previous to it I have access & and could process the correct device extension.
?
For your information I’m trying to use this single disk filter driver to filter out requests for multiple virtual disk devices.
?
Thanks
Som

?
On 6/16/06, Doron Holan wrote:
When you say the wrong extension, do you mean it is an extension for another device object that you created???Or a device extension for some device object created by another driver?

d
– I can spell, I just can’t type.
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Somsubhra Raj
Sent: Friday, June 16, 2006 4:30 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] 2 filter driver device extension

Hi all,

I’m facing a strange problem regarding my filter driver device.

I’ve a disk filter driver for some of my virtual scsi disk devices.
Now while processing the IO requests in my FilterIoThread function sometimes the filter driver device extension comes as a wrong one. And thats why when I try to use the data through the wrong device extension pointer I get wrong data which is crashing my system.

Now, for information,I create the FilterIOThread at the beginning while starting the filter device. And I am trying to use this single filterdriver for filtering my multiple virtual scsi disk device.

Have you anytime encountered this kind of problem ? Or do you have any suggestion regarding this problem ?

Thanks in Advance

Somsubhra Raj
— Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

— Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer</pdevice_object>