Queryt regarding asynchronous read request

I am queuing asynchronous read request to a driver. Is asynchronous read
request guaranteed to complete asynchronously? If I re-queue the read
request to the same driver in the read request completion routine, can it
result in stack overflow?

Ruby

Potentially, yee

d

debt from my phone


From: Ruby Siddhu
Sent: 10/31/2012 2:58 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Queryt regarding asynchronous read request

I am queuing asynchronous read request to a driver. Is asynchronous read request guaranteed to complete asynchronously? If I re-queue the read request to the same driver in the read request completion routine, can it result in stack overflow?

Ruby

— NTDEV is sponsored by OSR For our schedule of WDF, WDM, debugging and other seminars visit: http://www.osr.com/seminars To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Ruby Siddhu wrote:

I am queuing asynchronous read request to a driver. Is asynchronous
read request guaranteed to complete asynchronously? If I re-queue the
read request to the same driver in the read request completion
routine, can it result in stack overflow?

It depends. If the request actually had to wait for something, so that
the completion is called from a DPC, then you’re probably OK. It is
very common in the USB world to requeue a read in the completion routine
for a previous read.

But consider, for example, a request that has a format error, so that
the lower driver completes it immediately. In that case, the completion
will be done on the same stack as the request, and you will quickly get
a stack overflow.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

>complete asynchronously? If I re-queue the read request to the same driver in the read request

completion routine, can it result in stack overflow?

Yes it can.


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com