Re: Unload problems with filter driver

Tech-Archive recommends: Fix windows errors by optimizing your registry



Unless it is using the new mini-filter model, trying to unload a filter
driver is just asking for a crash. Your assumptions about when it is safe
are horribly wrong, there are multiple references to you device object still
around at that point.


--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Remove StopSpam from the email to reply



"helios" <helios@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:DEB38E8A-FCE0-4B57-9FE8-B2E1B2DA50A3@xxxxxxxxxxxxxxxx
> is it possible to implement a safe way for filter driver unload?
>
> I have a filter driver on top of a FSD. If there are no pending IRPs and
> there is no other driver attached to mine, it should be safe to unload the
> driver.
>
> But how to tell the system, when its safe? Setting UnloadDriver will cause
> the object manager to call it even if the driver is still atached to a
> fsd.
> It seems to unload everything even devices stored in drivers structure
> field
> DeviceObject.
>
> The result is: there is still a reference to a non existing object in the
> AttachedDevice field of the FSD device object.
>
> Even worse: if there are pending IRPs the system bugchecks.
>
> Is it possible to deactivate unloading by temporarily remove the reference
> to UnloadDriver and set it explicitely by ioctl when everything is fine/
> detached etc?
>
> (tried to post this question yesterday but it did not work)
>


.



Relevant Pages

  • Re: hooking api problem
    ... >> First, you cannot unload reliably. ... Only if your driver doesn't do anything to mess up it's assumptions or vice ... >> they are - the full FS filter. ... A good filter is more complicated if you do a lousy job on hooking, ...
    (microsoft.public.development.device.drivers)
  • Re: Determine if process is destroyed
    ... Filter drivers cannot unload. ... Even theoretically there are no 100% safe ways of unloading the filter. ... I would just forget forever the idea of unloading the driver which monitors ... All of them except the MS's CD mounter are unreliable toys for lab playing ...
    (microsoft.public.development.device.drivers)
  • Unload problems with filter driver
    ... I have a filter driver on top of a FSD. ... there is no other driver attached to mine, it should be safe to unload the ...
    (microsoft.public.development.device.drivers)
  • Re: 1394 + WinXP SP2
    ... >> all unload paths for your device. ... My own drivers do very light async I/O, ... I did not do extensive SP2 testing. ... you try your device with CUV and driver verifier with SP1? ...
    (microsoft.public.development.device.drivers)
  • Re: trap joystick collection
    ... you can filter the raw PDO that hidclass enumerates. ... the PDO driver is the service as well. ... > filtrs, the filtr just start, then unload immediately. ...
    (microsoft.public.development.device.drivers)