Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
828ac988
Commit
828ac988
authored
May 30, 2019
by
Jacek Caban
Committed by
Alexandre Julliard
May 30, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntoskrnl.exe: Set IRP caller thread.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
7f0883ae
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
ntoskrnl.c
dlls/ntoskrnl.exe/ntoskrnl.c
+2
-0
driver.c
dlls/ntoskrnl.exe/tests/driver.c
+8
-0
No files found.
dlls/ntoskrnl.exe/ntoskrnl.c
View file @
828ac988
...
...
@@ -1363,6 +1363,7 @@ PIRP WINAPI IoBuildDeviceIoControlRequest( ULONG code, PDEVICE_OBJECT device,
irp
->
UserBuffer
=
out_buff
;
irp
->
UserIosb
=
iosb
;
irp
->
UserEvent
=
event
;
irp
->
Tail
.
Overlay
.
Thread
=
(
PETHREAD
)
KeGetCurrentThread
();
return
irp
;
}
...
...
@@ -1415,6 +1416,7 @@ PIRP WINAPI IoBuildAsynchronousFsdRequest(ULONG majorfunc, DEVICE_OBJECT *device
irp
->
UserIosb
=
iosb
;
irp
->
UserEvent
=
NULL
;
irp
->
UserBuffer
=
buffer
;
irp
->
Tail
.
Overlay
.
Thread
=
(
PETHREAD
)
KeGetCurrentThread
();
return
irp
;
}
...
...
dlls/ntoskrnl.exe/tests/driver.c
View file @
828ac988
...
...
@@ -239,6 +239,8 @@ static void test_irp_struct(IRP *irp, DEVICE_OBJECT *device)
ok
(
irpsp
->
DeviceObject
==
device
,
"unexpected DeviceObject
\n
"
);
ok
(
irpsp
->
FileObject
->
DeviceObject
==
device
,
"unexpected FileObject->DeviceObject
\n
"
);
ok
(
!
irp
->
UserEvent
,
"UserEvent = %p
\n
"
,
irp
->
UserEvent
);
ok
(
irp
->
Tail
.
Overlay
.
Thread
==
(
PETHREAD
)
KeGetCurrentThread
(),
"IRP thread is not the current thread
\n
"
);
}
static
void
test_mdl_map
(
void
)
...
...
@@ -751,6 +753,8 @@ static void test_call_driver(DEVICE_OBJECT *device)
ok
(
!
irp
->
CancelRoutine
,
"CancelRoutine = %x
\n
"
,
irp
->
CancelRoutine
);
ok
(
!
irp
->
UserEvent
,
"UserEvent = %p
\n
"
,
irp
->
UserEvent
);
ok
(
irp
->
CurrentLocation
==
2
,
"CurrentLocation = %u
\n
"
,
irp
->
CurrentLocation
);
ok
(
irp
->
Tail
.
Overlay
.
Thread
==
(
PETHREAD
)
KeGetCurrentThread
(),
"IRP thread is not the current thread
\n
"
);
irpsp
=
IoGetNextIrpStackLocation
(
irp
);
ok
(
irpsp
->
MajorFunction
==
IRP_MJ_FLUSH_BUFFERS
,
"MajorFunction = %u
\n
"
,
irpsp
->
MajorFunction
);
...
...
@@ -773,6 +777,8 @@ static void test_call_driver(DEVICE_OBJECT *device)
ok
(
!
irp
->
CancelRoutine
,
"CancelRoutine = %x
\n
"
,
irp
->
CancelRoutine
);
ok
(
irp
->
UserEvent
==
&
event
,
"UserEvent = %p
\n
"
,
irp
->
UserEvent
);
ok
(
irp
->
CurrentLocation
==
2
,
"CurrentLocation = %u
\n
"
,
irp
->
CurrentLocation
);
ok
(
irp
->
Tail
.
Overlay
.
Thread
==
(
PETHREAD
)
KeGetCurrentThread
(),
"IRP thread is not the current thread
\n
"
);
irpsp
=
IoGetNextIrpStackLocation
(
irp
);
ok
(
irpsp
->
MajorFunction
==
IRP_MJ_FLUSH_BUFFERS
,
"MajorFunction = %u
\n
"
,
irpsp
->
MajorFunction
);
...
...
@@ -1698,6 +1704,8 @@ static NTSTATUS WINAPI driver_FlushBuffers(DEVICE_OBJECT *device, IRP *irp)
{
IO_STACK_LOCATION
*
irpsp
=
IoGetCurrentIrpStackLocation
(
irp
);
ok
(
irpsp
->
DeviceObject
==
device
,
"device != DeviceObject
\n
"
);
ok
(
irp
->
Tail
.
Overlay
.
Thread
==
(
PETHREAD
)
KeGetCurrentThread
(),
"IRP thread is not the current thread
\n
"
);
IoMarkIrpPending
(
irp
);
return
STATUS_PENDING
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment