stack overflow with startio and related routines

Hi,
Can some1 clear my doubt. From the DDK documentation, the flow will be like this with a fully flooded irp device queue.

StartPacket->StartIo->StartNextPacket->StartIo->…

Won’t this result in kernel stack overflow? Some1 pls clear me his doubt :slight_smile:

Thanks,
Giri.

Yes, it can. Be careful calling IoStartNextPacket from StartIo.

Max

----- Original Message -----
From: Seshagiri Babu K V
To: NT Developers Interest List
Sent: Tuesday, November 19, 2002 5:55 PM
Subject: [ntdev] stack overflow with startio and related routines

Hi,
Can some1 clear my doubt. From the DDK documentation, the flow will be like this with a fully flooded irp device queue.

StartPacket->StartIo->StartNextPacket->StartIo->…

Won’t this result in kernel stack overflow? Some1 pls clear me his doubt :slight_smile:

Thanks,
Giri.

You are currently subscribed to ntdev as: xxxxx@storagecraft.com
To unsubscribe send a blank email to %%email.unsub%%

You can use IoSetStartIoAttributes to avoid recursion.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/kmarch/hh/kmarch/k104_48tu.asp


-Eliyas
This posting is provided “AS IS” with no warranties, and confers no rights.

“Maxim S. Shatskih” wrote in message news:xxxxx@ntdev…
Yes, it can. Be careful calling IoStartNextPacket from StartIo.

Max

----- Original Message -----
From: Seshagiri Babu K V
To: NT Developers Interest List
Sent: Tuesday, November 19, 2002 5:55 PM
Subject: [ntdev] stack overflow with startio and related routines

Hi,
Can some1 clear my doubt. From the DDK documentation, the flow will be like this with a fully flooded irp device queue.

StartPacket->StartIo->StartNextPacket->StartIo->…

Won’t this result in kernel stack overflow? Some1 pls clear me his doubt :slight_smile:

Thanks,
Giri.

You are currently subscribed to ntdev as: xxxxx@storagecraft.com
To unsubscribe send a blank email to %%email.unsub%%

Eliyas’s advice about using IoSetStartIoAttributes is spot on if your
driver only runs on XP on later systems. For earlier systems, I suggest
that you schedule a DPC to call the StartNextPacket routine from
StartIo. This point is clarified in the 2d edition of my WDM book on p.
262 (if they don’t change the page numbering).

[January, to answer the obvious question.]


Walter Oney, Consulting and Training
Basic and Advanced Driver Programming Seminars
Now teaming with John Hyde for USB Device Engineering Seminars
Check out our schedule at http://www.oneysoft.com