From: Markov on
I am getting this when I enable Driver verifier on my driver

DRIVER_VERIFIER_IOMANAGER_VIOLATION (c9)
The IO manager has caught a misbehaving driver.
Arguments:
Arg1: 0000000000000220, IRP_MJ_SYSTEM_CONTROL has been completed by someone
other than the ProviderId.
This IRP should either have been completed earlier or should have been passed
down.
Arg2: fffff880041a29f0, The address in the driver's code where the error was
detected.
Arg3: fffff980022fed30, IRP address.
Arg4: fffffa800415f060, ProviderId.

Here is the part of the code its pointing at
NTSTATUS MySystemControl( IN PDEVICE_OBJECT fdo, IN PIRP Irp)
{
NTSTATUS status;
PDEVMSTR_DEVICE dx = (PDEVMSTR_DEVICE)fdo->DeviceExtension;

if( dx->IODisabled)
{
Irp->IoStatus.Status = STATUS_DEVICE_NOT_CONNECTED;
Irp->IoStatus.Information = 0;
IoCompleteRequest(Irp,IO_NO_INCREMENT);
return STATUS_DEVICE_NOT_CONNECTED;
}

// Just pass to lower driver
IoSkipCurrentIrpStackLocation(Irp);
status = IoCallDriver( dx->NextLowerDriver, Irp);

return status;
}

Any help would be appreciated.

Markov
From: Alexander Grigoriev on

"Markov" <Markov(a)discussions.microsoft.com> wrote in message
news:B6240407-E157-40F3-84DB-C9D650BA32E3(a)microsoft.com...
>I am getting this when I enable Driver verifier on my driver
>
> DRIVER_VERIFIER_IOMANAGER_VIOLATION (c9)
> The IO manager has caught a misbehaving driver.
> Arguments:
> Arg1: 0000000000000220, IRP_MJ_SYSTEM_CONTROL has been completed by
> someone
> other than the ProviderId.
> This IRP should either have been completed earlier or should have been
> passed
> down.
> Arg2: fffff880041a29f0, The address in the driver's code where the error
> was
> detected.
> Arg3: fffff980022fed30, IRP address.
> Arg4: fffffa800415f060, ProviderId.
>
> Here is the part of the code its pointing at
> NTSTATUS MySystemControl( IN PDEVICE_OBJECT fdo, IN PIRP Irp)
> {
> NTSTATUS status;
> PDEVMSTR_DEVICE dx = (PDEVMSTR_DEVICE)fdo->DeviceExtension;
>
> if( dx->IODisabled)
> {
> Irp->IoStatus.Status = STATUS_DEVICE_NOT_CONNECTED;
> Irp->IoStatus.Information = 0;
> IoCompleteRequest(Irp,IO_NO_INCREMENT);
> return STATUS_DEVICE_NOT_CONNECTED;
> }
>
> // Just pass to lower driver
> IoSkipCurrentIrpStackLocation(Irp);
> status = IoCallDriver( dx->NextLowerDriver, Irp);
>
> return status;
> }
>
> Any help would be appreciated.
>
> Markov


From: Alexander Grigoriev on
You should pass the IRP down. That's what the bugcheck explanation tells
you.

"Markov" <Markov(a)discussions.microsoft.com> wrote in message
news:B6240407-E157-40F3-84DB-C9D650BA32E3(a)microsoft.com...
>I am getting this when I enable Driver verifier on my driver
>
> DRIVER_VERIFIER_IOMANAGER_VIOLATION (c9)
> The IO manager has caught a misbehaving driver.
> Arguments:
> Arg1: 0000000000000220, IRP_MJ_SYSTEM_CONTROL has been completed by
> someone
> other than the ProviderId.
> This IRP should either have been completed earlier or should have been
> passed
> down.
> Arg2: fffff880041a29f0, The address in the driver's code where the error
> was
> detected.
> Arg3: fffff980022fed30, IRP address.
> Arg4: fffffa800415f060, ProviderId.
>
> Here is the part of the code its pointing at
> NTSTATUS MySystemControl( IN PDEVICE_OBJECT fdo, IN PIRP Irp)
> {
> NTSTATUS status;
> PDEVMSTR_DEVICE dx = (PDEVMSTR_DEVICE)fdo->DeviceExtension;
>
> if( dx->IODisabled)
> {
> Irp->IoStatus.Status = STATUS_DEVICE_NOT_CONNECTED;
> Irp->IoStatus.Information = 0;
> IoCompleteRequest(Irp,IO_NO_INCREMENT);
> return STATUS_DEVICE_NOT_CONNECTED;
> }
>
> // Just pass to lower driver
> IoSkipCurrentIrpStackLocation(Irp);
> status = IoCallDriver( dx->NextLowerDriver, Irp);
>
> return status;
> }
>
> Any help would be appreciated.
>
> Markov


From: Tim Roberts on
Markov <Markov(a)discussions.microsoft.com> wrote:
>
>I am getting this when I enable Driver verifier on my driver
>
>DRIVER_VERIFIER_IOMANAGER_VIOLATION (c9)
>The IO manager has caught a misbehaving driver.
>Arguments:
>Arg1: 0000000000000220, IRP_MJ_SYSTEM_CONTROL has been completed by someone
>other than the ProviderId.
> This IRP should either have been completed earlier or should have been passed
> down.
>...
>Here is the part of the code its pointing at
>NTSTATUS MySystemControl(IN PDEVICE_OBJECT fdo, IN PIRP Irp)
>{
> NTSTATUS status;
> PDEVMSTR_DEVICE dx = (PDEVMSTR_DEVICE)fdo->DeviceExtension;
>
> if( dx->IODisabled)
> {
> Irp->IoStatus.Status = STATUS_DEVICE_NOT_CONNECTED;
> Irp->IoStatus.Information = 0;
> IoCompleteRequest(Irp,IO_NO_INCREMENT);
> return STATUS_DEVICE_NOT_CONNECTED;
> }

Expanding on Alexender's answer, IRP_MJ_SYSTEM_CONTROL is used to implement
WMI, and WMI needs to operate whether or not your device is enabled. You
have to pass them all along.
--
Tim Roberts, timr(a)probo.com
Providenza & Boekelheide, Inc.
From: Markov on
I tried that.

Then the verifier started complaining about something else. I will post the
details when I get a chance.

"Tim Roberts" wrote:

> Markov <Markov(a)discussions.microsoft.com> wrote:
> >
> >I am getting this when I enable Driver verifier on my driver
> >
> >DRIVER_VERIFIER_IOMANAGER_VIOLATION (c9)
> >The IO manager has caught a misbehaving driver.
> >Arguments:
> >Arg1: 0000000000000220, IRP_MJ_SYSTEM_CONTROL has been completed by someone
> >other than the ProviderId.
> > This IRP should either have been completed earlier or should have been passed
> > down.
> >...
> >Here is the part of the code its pointing at
> >NTSTATUS MySystemControl(IN PDEVICE_OBJECT fdo, IN PIRP Irp)
> >{
> > NTSTATUS status;
> > PDEVMSTR_DEVICE dx = (PDEVMSTR_DEVICE)fdo->DeviceExtension;
> >
> > if( dx->IODisabled)
> > {
> > Irp->IoStatus.Status = STATUS_DEVICE_NOT_CONNECTED;
> > Irp->IoStatus.Information = 0;
> > IoCompleteRequest(Irp,IO_NO_INCREMENT);
> > return STATUS_DEVICE_NOT_CONNECTED;
> > }
>
> Expanding on Alexender's answer, IRP_MJ_SYSTEM_CONTROL is used to implement
> WMI, and WMI needs to operate whether or not your device is enabled. You
> have to pass them all along.
> --
> Tim Roberts, timr(a)probo.com
> Providenza & Boekelheide, Inc.
> .
>