Path: news.mitre.org!blanket.mitre.org!nntprelay.mathworks.com!howland.erols.net!newsxfer.itd.umich.edu!nntp.cs.ubc.ca!news.ultranet.com!not-for-mail From: "Jim McCollum" Newsgroups: comp.os.ms-windows.programmer.nt.kernel-mode Subject: Re: KeInsertQueueDpc bug on SMP systems? Date: Mon, 19 Jan 1998 12:57:52 -0500 Organization: UltraNet Communications, Inc. http://www.ultranet.com/ Lines: 34 Message-ID: <6a040n$5ui$1@decius.ultra.net> References: <69lhm3$q2r$1@decius.ultra.net> NNTP-Posting-Host: 146.115.154.11 X-Complaints-To: abuse@ultra.net X-Ultra-Time: 19 Jan 1998 17:54:31 GMT X-Newsreader: Microsoft Outlook Express 4.71.1712.3 X-MimeOLE: Produced By Microsoft MimeOLE V4.71.1712.3 I want to thank everyone who contributed to this discussion. My intent in posting the description of my problem was to share what I've found with others in the NT community, to verify my interpretation of how KeInsertQueueDpc works and to bring this behaviour to the attention of the NT engineering group at Microsoft. I am grateful to Dave Cutler for validating my workaround - I couldn't ask for a better source for that purpose. I realize that the way I'm queuing DPC objects in my driver (or, in this case, drivers) is somewhat non-standard and that the vast majority of drivers won't have to worry about this problem. It seems that the best way to eliminate this problem from KeInsertQueueDpc would be to add a spinlock to the DPC object itself and acquire it before manipulating the DPC lock field or queue links when queuing a non-targetted DPC object (targetted DPCs will not exhibit this behaviour, just as this is not a uniprocessor problem), but that would imply that all drivers compiled against the current DPC object format would no longer work. That is a heavy price to pay to fix a problem that very few drivers are likely to run into. I can envision other solutions as well, but they all have their downsides as well. I hope that by publishing this issue here I'll save someone else the trouble of hunting down the cause of their system crashes. Perhaps the folks at Microsoft might consider a change the to the DDK documentation to alert developers to this restriction. In any event, I can leave the workaround in my code. It'll solve the problem I'm seeing now and will be innocuous if KeInsertQueueDpc is ever changed. This is my first posting in this newsgroup. I must say, it's been an exciting an enlightening experience! The technical quality of the discussion is better than I could have imagines. Thanks again everyone, Jim