Merge Irp without memory copying?

Is is possible to merge two disk Irps into one Irp without memory copying? I tried allocating a new Irp and new MDLs, and copying the MDL of two requests and let the last mdl of the first request point to the mdl of the second request. But it seems to crash in PCIIDE driver. Just wondering if it is possible to do it.

MODULE_NAME: PCIIDEX

FAULTING_MODULE: fffff80001a17000 nt

DEBUG_FLR_IMAGE_TIMESTAMP: 4a5bc114

READ_ADDRESS: unable to get nt!MmSpecialPoolStart
unable to get nt!MmSpecialPoolEnd
unable to get nt!MmPoolCodeStart
unable to get nt!MmPoolCodeEnd
fffffc30639000e8

CURRENT_IRQL: 2

FAULTING_IP:
nt!KeFlushQueuedDpcs+2093
fffff800`01a41897 488b4128 mov rax,qword ptr [rcx+28h]

DEFAULT_BUCKET_ID: WRONG_SYMBOLS

BUGCHECK_STR: 0xA

LAST_CONTROL_TRANSFER: from fffff80001b7ed92 to fffff80001a8f490

STACK_TEXT:
fffff88003778718 fffff80001b7ed92 : fffffc30639000e8 fffffa800d207b60 0000000000000065 fffff80001ad3178 : nt!DbgBreakPointWithStatus
fffff88003778720 fffff80001b7fb7e : 0000000000000003 0000000000000000 fffff80001ad39d0 000000000000000a : nt!HeadlessDispatch+0x192
fffff88003778780 fffff80001a97744 : fffff8800377985c 0000000000000065 0000000000000003 fffff80001a41790 : nt!KeEnterKernelDebugger+0x76e
fffff88003778e50 fffff80001a96be9 : 000000000000000a fffffc30639000e8 0000000000000002 0000000000000000 : nt!KeBugCheckEx+0x104
fffff88003778e90 fffff80001a95860 : 0000000000000000 0000000000000000 0000000000000000 fffff6fb7dbf1000 : nt!KeSynchronizeExecution+0x3d59
fffff88003778fd0 fffff80001a41897 : 0000000000000000 0000000000000000 fffffa8000001f80 0000000000000000 : nt!KeSynchronizeExecution+0x29d0
fffff88003779160 fffff80001a9576e : 0000000000000001 0000000000000001 fffffa80100430b0 fffff88000b40000 : nt!KeFlushQueuedDpcs+0x2093
fffff880037792c0 fffff80001a99740 : fffff80002003e08 fffff88000b40000 0000000000000002 fffffa800fd8ec20 : nt!KeSynchronizeExecution+0x28de
fffff88003779458 fffff80002003e08 : fffff88000b40000 0000000000000002 fffffa800fd8ec20 fffffa800cfceea0 : nt!RtlCopyMemoryNonTemporal+0x40
fffff88003779460 fffff80002003593 : fffffa800cfceea0 fffffa800cfcee00 0000000000000000 0000000000000000 : hal!HalMakeBeep+0x1b40
fffff88003779510 fffff800020064fb : fffffa80297f0988 fffffa800cfceea0 fffffa800fd8ec20 fffff880037796a0 : hal!HalMakeBeep+0x12cb
fffff88003779560 fffff80002006472 : fffffa80297f0988 fffffa80297f0980 0000000000001000 0000000000000000 : hal!IoMapTransfer+0x117
fffff880037795f0 fffff8000200594f : 0000000000000000 fffff80002002fb9 0000000000000000 0000000000000010 : hal!IoMapTransfer+0x8e
fffff88003779630 fffff8000200613d : fffffa800cd871a0 fffffa800cfceea0 000000006c646d01 000000000000f000 : hal!HalFreeCommonBuffer+0x67b
fffff880037796d0 fffff8000200571f : fffffa80297f0940 0000000000010000 fffffa800cfceea0 fffffa800fd8ec20 : hal!HalAllocateAdapterChannel+0x101
fffff88003779710 fffff880011f10d3 : fffffa80297f08a0 fffff880011f112c fffff800000001c0 0000000000000246 : hal!HalFreeCommonBuffer+0x44b
fffff88003779780 fffff88001303b53 : fffffa80297f08a0 fffffa80297f08a0 fffffa800cd961a0 fffffa80297f08a0 : PCIIDEX+0x10d3
fffff880037797e0 fffff88001302803 : fffffa800cd97500 fffffa80297f08a0 fffffa800cd97500 fffffa800cd961a0 : ataport!AtaPortInitialize+0x47df
fffff88003779810 fffff88001302668 : 0000000000000001 0000000000000000 0000000000000000 0000000000000000 : ataport!AtaPortInitialize+0x348f
fffff88003779890 fffff880013039fa : fffffa800cd961a0 0000000000000000 0000000000000103 fffff80001c1e6c8 : ataport!AtaPortInitialize+0x32f4
fffff88003779950 fffff880012ff4ee : 0000000000000000 fffffa80297f08a0 0000000000000001 fffffa800fa78e60 : ataport!AtaPortInitialize+0x4686
fffff88003779980 fffff8800190d445 : 0000000000000000 0000000000000001 fffffa800fa78e60 000000feecb68000 : ataport!AtaPortInitialize+0x17a
fffff880037799b0 fffff8800190d975 : fffffa800d914010 fffffa800cfe5060 0000000000020000 0000000000000000 : CLASSPNP+0x1445
fffff88003779a50 fffff880011640af : fffffa801019a7a0 0000000000000080 fffffa801019a990 00000000000007ff : CLASSPNP+0x1975
fffff88003779aa0 fffff8800117918c : fffffa800d1feb20 fffffa801019a7a0 fffffa8000000001 0000000000000001 : partmgr+0x10af
fffff88003779ad0 fffff88001876108 : 0000000000000080 fffffa800d91b190 fffffa801019a7a0 00000000000ffe01 : volmgr+0x118c
fffff88003779b10 fffff880018e6ed3 : 0000000000000080 fffffa800cddd040 fffffa800d1efc90 0000000000000138 : volsnap+0x1108
fffff88003779b60 fffff880018e768a : fffffa80297bc4d0 fffffa8029780010 0000000000000000 fffffa800d207b60 : MyDriver!SendRequest+0xf3

The storage stack doesn’t support chained mdls.

d

Bent from my phone


From: ren.j@263.netmailto:ren.j
Sent: ?4/?22/?2013 7:26 AM
To: Windows System Software Devs Interest Listmailto:xxxxx
Subject: [ntdev] Merge Irp without memory copying?

Is is possible to merge two disk Irps into one Irp without memory copying? I tried allocating a new Irp and new MDLs, and copying the MDL of two requests and let the last mdl of the first request point to the mdl of the second request. But it seems to crash in PCIIDE driver. Just wondering if it is possible to do it.

MODULE_NAME: PCIIDEX

FAULTING_MODULE: fffff80001a17000 nt

DEBUG_FLR_IMAGE_TIMESTAMP: 4a5bc114

READ_ADDRESS: unable to get nt!MmSpecialPoolStart
unable to get nt!MmSpecialPoolEnd
unable to get nt!MmPoolCodeStart
unable to get nt!MmPoolCodeEnd
fffffc30639000e8

CURRENT_IRQL: 2

FAULTING_IP:
nt!KeFlushQueuedDpcs+2093
fffff80001a41897 488b4128 mov rax,qword ptr [rcx+28h]<br><br>DEFAULT_BUCKET_ID: WRONG_SYMBOLS<br><br>BUGCHECK_STR: 0xA<br><br>LAST_CONTROL_TRANSFER: from fffff80001b7ed92 to fffff80001a8f490<br><br>STACK_TEXT:<br>fffff88003778718 fffff80001b7ed92 : fffffc30639000e8 fffffa800d207b60 0000000000000065 fffff80001ad3178 : nt!DbgBreakPointWithStatus<br>fffff88003778720 fffff80001b7fb7e : 0000000000000003 0000000000000000 fffff80001ad39d0 000000000000000a : nt!HeadlessDispatch+0x192<br>fffff88003778780 fffff80001a97744 : fffff8800377985c 0000000000000065 0000000000000003 fffff80001a41790 : nt!KeEnterKernelDebugger+0x76e<br>fffff88003778e50 fffff80001a96be9 : 000000000000000a fffffc30639000e8 0000000000000002 0000000000000000 : nt!KeBugCheckEx+0x104<br>fffff88003778e90 fffff80001a95860 : 0000000000000000 0000000000000000 0000000000000000 fffff6fb7dbf1000 : nt!KeSynchronizeExecution+0x3d59<br>fffff88003778fd0 fffff80001a41897 : 0000000000000000 0000000000000000 fffffa8000001f80 0000000000000000 : nt!KeSynchronizeExecution+0x29d0<br>fffff88003779160 fffff80001a9576e : 0000000000000001 0000000000000001 fffffa80100430b0 fffff88000b40000 : nt!KeFlushQueuedDpcs+0x2093<br>fffff880037792c0 fffff80001a99740 : fffff80002003e08 fffff88000b40000 0000000000000002 fffffa800fd8ec20 : nt!KeSynchronizeExecution+0x28de<br>fffff88003779458 fffff80002003e08 : fffff88000b40000 0000000000000002 fffffa800fd8ec20 fffffa800cfceea0 : nt!RtlCopyMemoryNonTemporal+0x40<br>fffff88003779460 fffff80002003593 : fffffa800cfceea0 fffffa800cfcee00 0000000000000000 0000000000000000 : hal!HalMakeBeep+0x1b40<br>fffff88003779510 fffff800020064fb : fffffa80297f0988 fffffa800cfceea0 fffffa800fd8ec20 fffff880037796a0 : hal!HalMakeBeep+0x12cb<br>fffff88003779560 fffff80002006472 : fffffa80297f0988 fffffa80297f0980 0000000000001000 0000000000000000 : hal!IoMapTransfer+0x117<br>fffff880037795f0 fffff8000200594f : 0000000000000000 fffff80002002fb9 0000000000000000 0000000000000010 : hal!IoMapTransfer+0x8e<br>fffff88003779630 fffff8000200613d : fffffa800cd871a0 fffffa800cfceea0 000000006c646d01 000000000000f000 : hal!HalFreeCommonBuffer+0x67b<br>fffff880037796d0 fffff8000200571f : fffffa80297f0940 0000000000010000 fffffa800cfceea0 fffffa800fd8ec20 : hal!HalAllocateAdapterChannel+0x101<br>fffff88003779710 fffff880011f10d3 : fffffa80297f08a0 fffff880011f112c fffff800000001c0 0000000000000246 : hal!HalFreeCommonBuffer+0x44b<br>fffff88003779780 fffff88001303b53 : fffffa80297f08a0 fffffa80297f08a0 fffffa800cd961a0 fffffa80297f08a0 : PCIIDEX+0x10d3<br>fffff880037797e0 fffff88001302803 : fffffa800cd97500 fffffa80297f08a0 fffffa800cd97500 fffffa800cd961a0 : ataport!AtaPortInitialize+0x47df<br>fffff88003779810 fffff88001302668 : 0000000000000001 0000000000000000 0000000000000000 0000000000000000 : ataport!AtaPortInitialize+0x348f<br>fffff88003779890 fffff880013039fa : fffffa800cd961a0 0000000000000000 0000000000000103 fffff80001c1e6c8 : ataport!AtaPortInitialize+0x32f4<br>fffff88003779950 fffff880012ff4ee : 0000000000000000 fffffa80297f08a0 0000000000000001 fffffa800fa78e60 : ataport!AtaPortInitialize+0x4686<br>fffff88003779980 fffff8800190d445 : 0000000000000000 0000000000000001 fffffa800fa78e60 000000feecb68000 : ataport!AtaPortInitialize+0x17a<br>fffff880037799b0 fffff8800190d975 : fffffa800d914010 fffffa800cfe5060 0000000000020000 0000000000000000 : CLASSPNP+0x1445<br>fffff88003779a50 fffff880011640af : fffffa801019a7a0 0000000000000080 fffffa801019a990 00000000000007ff : CLASSPNP+0x1975<br>fffff88003779aa0 fffff8800117918c : fffffa800d1feb20 fffffa801019a7a0 fffffa8000000001 0000000000000001 : partmgr+0x10af<br>fffff88003779ad0 fffff88001876108 : 0000000000000080 fffffa800d91b190 fffffa801019a7a0 00000000000ffe01 : volmgr+0x118c<br>fffff88003779b10 fffff880018e6ed3 : 0000000000000080 fffffa800cddd040 fffffa800d1efc90 0000000000000138 : volsnap+0x1108<br>fffff88003779b60 fffff880018e768a : fffffa80297bc4d0 fffffa8029780010 0000000000000000 fffffa80`0d207b60 : MyDriver!SendRequest+0xf3


NTDEV is sponsored by OSR

OSR is HIRING!! See http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer</mailto:xxxxx></mailto:ren.j>