https://git.reactos.org/?p=reactos.git;a=commitdiff;h=98a8e8f862251844fa39faa57822485feaf9d937
commit 98a8e8f862251844fa39faa57822485feaf9d937 Author: Timo Kreuzer <timo.kreu...@reactos.org> AuthorDate: Sun Jun 2 09:45:45 2019 +0200 Commit: Timo Kreuzer <timo.kreu...@reactos.org> CommitDate: Thu Aug 15 18:04:57 2019 +0200 [NTOS:IO] In IopSynchronousCall first check IrpStack->MajorFunction before checking minor Minor function indices are not unique, they are subfunctions, so without first checking the major function, they are ambiguous. --- ntoskrnl/io/pnpmgr/pnpmgr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ntoskrnl/io/pnpmgr/pnpmgr.c b/ntoskrnl/io/pnpmgr/pnpmgr.c index e5530c61714..f2048782af0 100644 --- a/ntoskrnl/io/pnpmgr/pnpmgr.c +++ b/ntoskrnl/io/pnpmgr/pnpmgr.c @@ -1441,7 +1441,8 @@ IopSynchronousCall(IN PDEVICE_OBJECT DeviceObject, Irp->IoStatus.Information = IoStatusBlock.Information = 0; /* Special case for IRP_MN_FILTER_RESOURCE_REQUIREMENTS */ - if (IoStackLocation->MinorFunction == IRP_MN_FILTER_RESOURCE_REQUIREMENTS) + if ((IoStackLocation->MajorFunction == IRP_MJ_PNP) && + (IoStackLocation->MinorFunction == IRP_MN_FILTER_RESOURCE_REQUIREMENTS)) { /* Copy the resource requirements list into the IOSB */ Irp->IoStatus.Information =