mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 00:45:49 +00:00
- Fix mdl probe access rights
svn path=/trunk/; revision=49336
This commit is contained in:
parent
ed04f3bb51
commit
4995df02c5
1 changed files with 14 additions and 4 deletions
|
@ -724,7 +724,16 @@ ProbeMdl:
|
||||||
Mdl = Irp->MdlAddress;
|
Mdl = Irp->MdlAddress;
|
||||||
|
|
||||||
/* determine operation */
|
/* determine operation */
|
||||||
Operation = (ProbeFlags & KSPROBE_STREAMWRITE) ? IoWriteAccess : IoReadAccess;
|
if (!(ProbeFlags & KSPROBE_STREAMWRITE) || (ProbeFlags & KSPROBE_MODIFY))
|
||||||
|
{
|
||||||
|
/* operation is read / modify stream, need write access */
|
||||||
|
Operation = IoWriteAccess;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* operation is write to device, so we need read access */
|
||||||
|
Operation = IoReadAccess;
|
||||||
|
}
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
|
@ -859,7 +868,8 @@ ProbeMdl:
|
||||||
if (StreamHeader->FrameExtent)
|
if (StreamHeader->FrameExtent)
|
||||||
{
|
{
|
||||||
/* allocate an mdl */
|
/* allocate an mdl */
|
||||||
Mdl = IoAllocateMdl(StreamHeader->Data, StreamHeader->FrameExtent, Irp->MdlAddress != NULL, TRUE, Irp);
|
ASSERT(Irp->MdlAddress == NULL);
|
||||||
|
Mdl = IoAllocateMdl(StreamHeader->Data, StreamHeader->FrameExtent, FALSE, TRUE, Irp);
|
||||||
if (!Mdl)
|
if (!Mdl)
|
||||||
{
|
{
|
||||||
/* not enough memory */
|
/* not enough memory */
|
||||||
|
@ -880,10 +890,10 @@ ProbeMdl:
|
||||||
|
|
||||||
/* now probe the allocated mdl's */
|
/* now probe the allocated mdl's */
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT("Status %x\n", Status);
|
DPRINT("Status %x\n", Status);
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
goto ProbeMdl;
|
goto ProbeMdl;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue