Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
364df148
Commit
364df148
authored
Apr 14, 2021
by
Zebediah Figura
Committed by
Alexandre Julliard
Apr 14, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntoskrnl: Forbid unloading a driver with running root PnP devices.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
5bf72a75
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
ntoskrnl.c
dlls/ntoskrnl.exe/ntoskrnl.c
+8
-0
No files found.
dlls/ntoskrnl.exe/ntoskrnl.c
View file @
364df148
...
...
@@ -3842,6 +3842,7 @@ error:
NTSTATUS
WINAPI
ZwUnloadDriver
(
const
UNICODE_STRING
*
service_name
)
{
struct
wine_rb_entry
*
entry
;
struct
wine_driver
*
driver
;
UNICODE_STRING
drv_name
;
TRACE
(
"(%s)
\n
"
,
debugstr_us
(
service_name
)
);
...
...
@@ -3856,6 +3857,13 @@ NTSTATUS WINAPI ZwUnloadDriver( const UNICODE_STRING *service_name )
ERR
(
"failed to locate driver %s
\n
"
,
debugstr_us
(
service_name
)
);
return
STATUS_OBJECT_NAME_NOT_FOUND
;
}
driver
=
WINE_RB_ENTRY_VALUE
(
entry
,
struct
wine_driver
,
entry
);
if
(
!
list_empty
(
&
driver
->
root_pnp_devices
))
{
ERR
(
"cannot unload driver %s which still has running PnP devices
\n
"
,
debugstr_us
(
service_name
)
);
return
STATUS_UNSUCCESSFUL
;
}
unload_driver
(
entry
,
NULL
);
...
...
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