MCPcopy Create free account
hub / github.com/bobranten/Ext4Fsd / Ext2LockUserBuffer

Function Ext2LockUserBuffer

Ext4Fsd/block.c:100–131  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98}
99
100NTSTATUS
101Ext2LockUserBuffer (IN PIRP Irp,
102 IN ULONG Length,
103 IN LOCK_OPERATION Operation)
104{
105 NTSTATUS Status;
106 ASSERT(Irp != NULL);
107
108 if (Irp->MdlAddress != NULL) {
109 return STATUS_SUCCESS;
110 }
111
112 IoAllocateMdl(Irp->UserBuffer, Length, FALSE, FALSE, Irp);
113 if (Irp->MdlAddress == NULL) {
114 return STATUS_INSUFFICIENT_RESOURCES;
115 }
116
117 __try {
118
119 MmProbeAndLockPages(Irp->MdlAddress, Irp->RequestorMode, Operation);
120 Status = STATUS_SUCCESS;
121
122 } __except (EXCEPTION_EXECUTE_HANDLER) {
123
124 DbgBreak();
125 IoFreeMdl(Irp->MdlAddress);
126 Irp->MdlAddress = NULL;
127 Status = STATUS_INVALID_USER_BUFFER;
128 }
129
130 return Status;
131}
132
133PVOID
134Ext2GetUserBuffer (IN PIRP Irp )

Callers 6

Ext2QueryDirectoryFunction · 0.85
Ext2LockIrpFunction · 0.85
Ext2WriteVolumeFunction · 0.85
Ext2WriteFileFunction · 0.85
Ext2ReadVolumeFunction · 0.85
Ext2ReadFileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected