How to solve Bug Check 0x35: NO_MORE_IRP_STACK_LOCATIONS ?

Hi all

I have a problem in a special condition. Our driver kind of multifunction
driver, the child device is treated as USB audio device. Everything is
normal and working good. In our application, when I tried to do Intercom (
one sound card mic to other sound card speaker and vice versa ) with Sound
card and USB audio device and when it is exchanging the audio and if our
device is unplugged suddenly , the system crashes with Bug Check 0x35:
NO_MORE_IRP_STACK_LOCATIONS error. Normally , When I get a request from USB
audio driver ( Microsoft ) , if it need to be send down then I will prepare
a new request and send it down .

when the device is unplugged suddenly, I still see the requests coming down
from USB audio driver and even kept the check for stack size before
allocating the IRP and passing down. For some reason , the system crashes
with the above error. Normally I check for the device removal flag before
sending the request down. But the requests from USB audio are coming
continuously with out interruption along with reset pipe and abort pipe
requests . I want to know is there any way that I can stop these requests
coming down . I see the following error in debugger

Probably caused by : usbaudio.sys ( usbaudio!StartIsocInputTransfer+64 )

I am pretty much sure that I am not just forwarding the request came from
USB audio driver to next layer.Can anybody tell me the best way to check
whether I am allocating right stack size before passing down the request to
the next layer . Or How can I ensure it does have enough stack locations.
Even though I am checking for stack size before sending the request down it
is not helping .

Or the system is already gone to some state where it can’t recover . Because
this problem does not occur on Windows XP.

any ideas.

thanks in advance,
sri.