DDK sample bug reporting

DDK sample bug reporting

Post by BubbaGum » Sat, 23 Dec 2006 10:16:49

What's the proper way to report a potential bug in a DDK sample?

DDK sample bug reporting

Post by Doron Hola » Sat, 23 Dec 2006 12:47:19

you can use one of hte ddk feedback links on a WDK page that relate to the
sample (if there is one). what is the bug you want to report?

Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.


DDK sample bug reporting

Post by Tim Robert » Sat, 23 Dec 2006 14:34:47

This newsgroup is a good place to start. Many members of the DDK team are
regular participants.
Providenza & Boekelheide, Inc.

DDK sample bug reporting

Post by BubbaGum » Sat, 23 Dec 2006 22:49:51

On Thu, 21 Dec 2006 19:47:19 -0800, "Doron Holan [MS]"

What I noticed is in the toaster bus sample (starting from the
DriverEntry in general\toaster\bus\busenum.c). In a couple cases it
orders its custom remove lock operations backwards, which are race

For IRP_MJ_PNP and IRP_MJ_POWER it tests
DevicePnPState first but waits until a little later to call
Bus_IncIoCount. This is a test-and-set race. In the time between the
test on the state and the increment of the count, an
IRP_MN_REMOVE_DEVICE could have been handled, seen from the old count
that the device wasn't in use, and proceeded with removal just as the
handler for IRP_MJ_PNP and IRP_MJ_POWER was beginning to run.

(The operations are ordered the safe set-first-then-test way for
is ironic since these are the IRPs that shouldn't happen during/after
removal for other reasons.)

While I was looking at this, I also noticed a Bus_DecIoCount missing
from the (DevicePnPState == Deleted) error cleanup of the IRP_MJ_CLOSE
handler. Although it may be unnecessary to use a remove lock for
IRP_MJ_CLOSE, if the example usage were used elsewhere then it could
prevent a device from ever being removed if it happened while the
driver was handling IRP_MN_REMOVE_DEVICE during the time when it would
have blocked new requests and would be waiting for current requests to

DDK sample bug reporting

Post by BubbaGum » Sat, 23 Dec 2006 22:51:58

On Thu, 21 Dec 2006 21:34:47 -0800, Tim Roberts < XXXX@XXXXX.COM >

I tried that once, but the Subject: line didn't seem to get anyone's
attention, enough to confirm or deny the bug.

DDK sample bug reporting

Post by Eliyas Yak » Sun, 24 Dec 2006 00:03:54

I will look into it. I don't have access to the source code right now.


DDK sample bug reporting

Post by BubbaGum » Sun, 24 Dec 2006 02:03:41


On Fri, 22 Dec 2006 07:03:54 -0800, "Eliyas Yakub [MSFT]"