Call
RemoveEntryList( &irp->ThreadListEntry );
InitializeListHead( &irp->ThreadListEntry ) ;
before IoFreeIrp will avoid this bugcheck.
Regards
Haibo
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Charansing Rajput
Sent: Friday, April 24, 2009 3:57 PM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] IoBuildDeviceIoControlRequest & IoFreeIrp
On a particular condition i might have to decide not to call IoCallDriver.
And well.... for IoFreeIrp I get bugcheck C9 (0x2) which says that "The
driver attempted to free an IRP that is still associated with a thread."
Thanks and Regards,
Charansing D Deore
Sr. Software Developer,
CalSoft Pvt Ltd.
Baner Road, Pune-411045
Office: +91 20 40792900 Ext: 3052
Cell: +91 9850960550
On Fri, Apr 24, 2009 at 1:01 PM, Haibo wrote:
You should free it by IoFreeIrp if IoCallDriver is not called.
BUT why do you build it when you do not call IoCallDriver?
Regards
Haibo
_____
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Charansing Rajput
Sent: Friday, April 24, 2009 2:59 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] IoBuildDeviceIoControlRequest & IoFreeIrp
Hi,
WDK documentation says:
IRPs that are created by IoBuildDeviceIoControlRequest must be completed by
a driver's call to
http:
IoCompleteRequest. A driver that calls IoBuildDeviceIoControlRequest must
not call http:
IoFreeIrp, because the I/O manager frees these synchronous IRPs after
IoCompleteRequest has been called.
I guess here the assumption is implied that after calling
IoBuildDeviceIoControlRequest the IRP is passed to IoCallDriver. But in case
I find out that I should not call IoCallDriver for some reason, then who
should call IoFreeIRP. To be precise who should free that IRP and HOW? Can I
call IoCompleteRequest without making any call to IoCallDriver on that IRP.
Thanks and Regards,
----------------------------------------------------------------
Charansing D Deore
Sr. Software Developer,
CalSoft Pvt Ltd.
Baner Road, Pune-411045
Office: +91 20 40792900 Ext: 3052
Cell: +91 9850960550
--- NTDEV is sponsored by OSR For our schedule of WDF, WDM, debugging and
other seminars visit: OSR Seminars – OSR To unsubscribe, visit the
List Server section of OSR Online at
ListServer/Forum
---
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
OSR Seminars – OSR
To unsubscribe, visit the List Server section of OSR Online at
ListServer/Forum
--- NTDEV is sponsored by OSR For our schedule of WDF, WDM, debugging and
other seminars visit: OSR Seminars – OSR To unsubscribe, visit the
List Server section of OSR Online at
ListServer/Forum</http:></http:>