error ATTEMPTED_SWITCH_FROM_DPC (0XB8)

Hi,

I am writing an NDIS driver, which in turn interact with the wdm
driver. In the SendHandler routine I am allocating and intializing the
IRPs, calling the lower WDM driver and waiting for the lower driver to
finish the processing.

But, after I send few packets I am getting this error (Error=B8
ATTEMPTED_SWITCH_FROM_DPC) when I call KeWaitForSingleObject routine.
Can somebody guide me on how to overcome this problem.

thanking in advance,

Kantharaj

It is invalid to cause any thread context switches at IRQL ==
DISPATCH_LEVEL. DPC’s run at DISPATCH_LEVEL. So, any wait for a nonzero
timeout is invalid. You cant call KeWaitForSingleObject() in a DPC routine.

----- Original Message -----
From: “kantharaj”
To: “NT Developers Interest List”
Sent: Wednesday, June 25, 2003 11:07 AM
Subject: [ntdev] error ATTEMPTED_SWITCH_FROM_DPC (0XB8)

> Hi,
>
> I am writing an NDIS driver, which in turn interact with the wdm
> driver. In the SendHandler routine I am allocating and intializing the
> IRPs, calling the lower WDM driver and waiting for the lower driver to
> finish the processing.
>
> But, after I send few packets I am getting this error (Error=B8
> ATTEMPTED_SWITCH_FROM_DPC) when I call KeWaitForSingleObject routine.
> Can somebody guide me on how to overcome this problem.
>
> thanking in advance,
>
> Kantharaj
>
> —
> You are currently subscribed to ntdev as: xxxxx@rdsor.ro
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>

You can’t do a wait operation at DISPATCH IRQL. You may be attempting this
from a DPC routine, or you may have a spinlock held.

-----Original Message-----
From: kantharaj [mailto:xxxxx@periplus.co.kr]
Sent: Wednesday, June 25, 2003 4:07 AM
To: NT Developers Interest List
Subject: [ntdev] error ATTEMPTED_SWITCH_FROM_DPC (0XB8)

Hi,

I am writing an NDIS driver, which in turn interact with the wdm
driver. In the SendHandler routine I am allocating and intializing the
IRPs, calling the lower WDM driver and waiting for the lower driver to
finish the processing.

But, after I send few packets I am getting this error (Error=B8
ATTEMPTED_SWITCH_FROM_DPC) when I call KeWaitForSingleObject routine.
Can somebody guide me on how to overcome this problem.

thanking in advance,

Kantharaj


You are currently subscribed to ntdev as: xxxxx@stratus.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

This bugcheck is specifically issued only when a DPC is in progress. A
simple IRQL raise wont yeld this error, but a different one.

----- Original Message -----
From: “Croci, MaryBeth”
To: “NT Developers Interest List”
Sent: Wednesday, June 25, 2003 4:50 PM
Subject: [ntdev] RE: error ATTEMPTED_SWITCH_FROM_DPC (0XB8)

> You can’t do a wait operation at DISPATCH IRQL. You may be attempting
this
> from a DPC routine, or you may have a spinlock held.
>
> -----Original Message-----
> From: kantharaj [mailto:xxxxx@periplus.co.kr]
> Sent: Wednesday, June 25, 2003 4:07 AM
> To: NT Developers Interest List
> Subject: [ntdev] error ATTEMPTED_SWITCH_FROM_DPC (0XB8)
>
>
> Hi,
>
> I am writing an NDIS driver, which in turn interact with the wdm
> driver. In the SendHandler routine I am allocating and intializing the
> IRPs, calling the lower WDM driver and waiting for the lower driver to
> finish the processing.
>
> But, after I send few packets I am getting this error (Error=B8
> ATTEMPTED_SWITCH_FROM_DPC) when I call KeWaitForSingleObject routine.
> Can somebody guide me on how to overcome this problem.
>
> thanking in advance,
>
> Kantharaj
>
> —
> You are currently subscribed to ntdev as: xxxxx@stratus.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@rdsor.ro
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>

That’s all right. Use DriverVerifier, it will make sure you are doing
things the right way.

Mat

-----Original Message-----
From: Croci, MaryBeth [mailto:xxxxx@stratus.com]
Sent: Wednesday, June 25, 2003 9:50 AM
To: NT Developers Interest List
Subject: [ntdev] RE: error ATTEMPTED_SWITCH_FROM_DPC (0XB8)

You can’t do a wait operation at DISPATCH IRQL. You may be attempting this
from a DPC routine, or you may have a spinlock held.

-----Original Message-----
From: kantharaj [mailto:xxxxx@periplus.co.kr]
Sent: Wednesday, June 25, 2003 4:07 AM
To: NT Developers Interest List
Subject: [ntdev] error ATTEMPTED_SWITCH_FROM_DPC (0XB8)

Hi,

I am writing an NDIS driver, which in turn interact with the wdm
driver. In the SendHandler routine I am allocating and intializing the
IRPs, calling the lower WDM driver and waiting for the lower driver to
finish the processing.

But, after I send few packets I am getting this error (Error=B8
ATTEMPTED_SWITCH_FROM_DPC) when I call KeWaitForSingleObject routine.
Can somebody guide me on how to overcome this problem.

thanking in advance,

Kantharaj


You are currently subscribed to ntdev as: xxxxx@stratus.com
To unsubscribe send a blank email to xxxxx@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@guillemot.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Dan,

Curious … why do you say that it cannot be called in a DPC, given that it
is called legally and the timer is set to zero?


Gary G. Little
Seagate Technologies, LLC
xxxxx@seagate.com

“Dan Partelly” wrote in message news:xxxxx@ntdev…
>
> It is invalid to cause any thread context switches at IRQL ==
> DISPATCH_LEVEL. DPC’s run at DISPATCH_LEVEL. So, any wait for a nonzero
> timeout is invalid. You cant call KeWaitForSingleObject() in a DPC
routine.
>
>
> ----- Original Message -----
> From: “kantharaj”
> To: “NT Developers Interest List”
> Sent: Wednesday, June 25, 2003 11:07 AM
> Subject: [ntdev] error ATTEMPTED_SWITCH_FROM_DPC (0XB8)
>
>
> > Hi,
> >
> > I am writing an NDIS driver, which in turn interact with the wdm
> > driver. In the SendHandler routine I am allocating and intializing the
> > IRPs, calling the lower WDM driver and waiting for the lower driver to
> > finish the processing.
> >
> > But, after I send few packets I am getting this error (Error=B8
> > ATTEMPTED_SWITCH_FROM_DPC) when I call KeWaitForSingleObject routine.
> > Can somebody guide me on how to overcome this problem.
> >
> > thanking in advance,
> >
> > Kantharaj
> >
> > —
> > You are currently subscribed to ntdev as: xxxxx@rdsor.ro
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
> >
>
>
>
>

A sentence which was not formulated carefull enugh, Garry. You are right.

----- Original Message -----
From: “Gary G. Little”
Newsgroups: ntdev
To: “NT Developers Interest List”
Sent: Wednesday, June 25, 2003 6:34 PM
Subject: [ntdev] Re: error ATTEMPTED_SWITCH_FROM_DPC (0XB8)

> Dan,
>
> Curious … why do you say that it cannot be called in a DPC, given that
it
> is called legally and the timer is set to zero?
>
> –
> Gary G. Little
> Seagate Technologies, LLC
> xxxxx@seagate.com
>
> “Dan Partelly” wrote in message
news:xxxxx@ntdev…
> >
> > It is invalid to cause any thread context switches at IRQL ==
> > DISPATCH_LEVEL. DPC’s run at DISPATCH_LEVEL. So, any wait for a nonzero
> > timeout is invalid. You cant call KeWaitForSingleObject() in a DPC
> routine.
> >
> >
> > ----- Original Message -----
> > From: “kantharaj”
> > To: “NT Developers Interest List”
> > Sent: Wednesday, June 25, 2003 11:07 AM
> > Subject: [ntdev] error ATTEMPTED_SWITCH_FROM_DPC (0XB8)
> >
> >
> > > Hi,
> > >
> > > I am writing an NDIS driver, which in turn interact with the wdm
> > > driver. In the SendHandler routine I am allocating and intializing the
> > > IRPs, calling the lower WDM driver and waiting for the lower driver to
> > > finish the processing.
> > >
> > > But, after I send few packets I am getting this error (Error=B8
> > > ATTEMPTED_SWITCH_FROM_DPC) when I call KeWaitForSingleObject routine.
> > > Can somebody guide me on how to overcome this problem.
> > >
> > > thanking in advance,
> > >
> > > Kantharaj
> > >
> > > —
> > > You are currently subscribed to ntdev as: xxxxx@rdsor.ro
> > > To unsubscribe send a blank email to xxxxx@lists.osr.com
> > >
> >
> >
> >
> >
>
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@rdsor.ro
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>