From: SMTP%"simon@idacom.hp.com" 24-SEP-1997 17:36:29.39 To: "DDK-L" , "NTDEV Mailing List" CC: Subj: Memory allocation from DriverEntry Return-Path: owner-ntdev@atria.com Received: by arisia.gce.com (UCX V4.1-12C, OpenVMS V7.1 VAX); Wed, 24 Sep 1997 17:30:24 -0400 Received: from gw.atria.com (gw.atria.com [192.88.237.2]) by bort.mv.net (8.8.5/mem-951016) with SMTP id BAA08690 for ; Wed, 24 Sep 1997 01:14:13 -0400 (EDT) Received: by gw.atria.com id Tue, 23 Sep 1997 19:27:45 -0400 Received: from palrel3.hp.com by gw.atria.com id Tue, 23 Sep 1997 19:27:38 -0400 Received: from mailhub.idacom.hp.com (mailhub.idacom.hp.com [15.29.120.137]) by palrel3.hp.com (8.8.5/8.8.5tis) with ESMTP id QAA10615; Tue, 23 Sep 1997 16:27:37 -0700 (PDT) Received: from itovntc40 (itovntc40.idacom.hp.com) by mailhub.idacom.hp.com with SMTP ($Revision: 1.37.109.26 $/15.5+ECS 3.3) id AA104117246; Tue, 23 Sep 1997 17:27:26 -0600 Message-Id: <199709232327.AA104117246@mailhub.idacom.hp.com> From: "Simon Block" To: "DDK-L" , "NTDEV Mailing List" Subject: Memory allocation from DriverEntry Date: Tue, 23 Sep 1997 16:32:09 -0700 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-Msmail-Priority: Normal X-Mailer: Microsoft Outlook Express 4.71.1008.3 X-Mimeole: Produced By Microsoft MimeOLE Engine V4.71.1008.3 Sender: owner-ntdev@atria.com Precedence: bulk Hi All, I have tracked down my BugCheckEx: ***STOP 0x00000A (0xE148347C, 0x00000009, 0x00000000, 0xF8D443D2) IRQL NOT LESS THAN OR EQUAL to a reference to a pointer that is allocated by DriverEntry (actually a function called from DriverEntry). The crash always happens in a rountine that is running at DIRQL. I have to allocate this data as this is used in the search for the device so no DeviceObject exists yet so I don't have a Device Extension. You should have seen my face when I realised I had allocated the memory from PagedPool !!!! So I fixed this and made it allocated from NonPagedPool. However I still got (although much less frequently) a BSOD from a reference to a pointer to this structure at DIRQL. I have now changed the code so that the data I need in this structure is copied to the Device Extension in DriverEntry so that a pointer to this data is no longer needed in the DIRQL rountines (including the ISR). Hence now my DIRQL rountines do not access this pointer (only the Device Extension) and so far (I have been testing for nearly an hour and it usually fails in minutes) so good. Can someone confirm for me that using memory allocated from DriverEntry even from NonPagedPool from a rountine running at DIRQL is a no-no. My DriverEntry routine is NOT discardable or pagable (BTW via the PRAGMA statement). PS. On the softice side Cheers. regards, Simon Block. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [ To unsubscribe, send email to ntdev-request@atria.com with body UNSUBSCRIBE (the subject is ignored). ]