Author: pschweitzer
Date: Sun Jun 21 05:46:38 2015
New Revision: 68222
URL:
http://svn.reactos.org/svn/reactos?rev=68222&view=rev
Log:
[NTOSKRNL]
Revert r68221: probing *should* be done in NtSetSystemInformation()
Let's check there why it's not done instead...
Modified:
trunk/reactos/ntoskrnl/ex/sysinfo.c
Modified: trunk/reactos/ntoskrnl/ex/sysinfo.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/sysinfo.c?rev=…
==============================================================================
--- trunk/reactos/ntoskrnl/ex/sysinfo.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ex/sysinfo.c [iso-8859-1] Sun Jun 21 05:46:38 2015
@@ -2068,31 +2068,10 @@
{
return STATUS_PRIVILEGE_NOT_HELD;
}
-
- _SEH2_TRY
- {
- ProbeForWriteUlong(Buffer);
- }
- _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
- {
- _SEH2_YIELD(return _SEH2_GetExceptionCode());
- }
- _SEH2_END;
}
Status = MmSessionCreate(&SessionId);
- if (NT_SUCCESS(Status))
- {
- _SEH2_TRY
- {
- *(PULONG)Buffer = SessionId;
- }
- _SEH2_EXCEPT(ExSystemExceptionFilter())
- {
- Status = _SEH2_GetExceptionCode();
- }
- _SEH2_END;
- }
+ if (NT_SUCCESS(Status)) *(PULONG)Buffer = SessionId;
return Status;
}
@@ -2112,21 +2091,9 @@
{
return STATUS_PRIVILEGE_NOT_HELD;
}
-
- _SEH2_TRY
- {
- SessionId = ProbeForReadUlong(Buffer);
- }
- _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
- {
- _SEH2_YIELD(return _SEH2_GetExceptionCode());
- }
- _SEH2_END;
- }
- else
- {
- SessionId = *(PULONG)Buffer;
- }
+ }
+
+ SessionId = *(PULONG)Buffer;
return MmSessionDelete(SessionId);
}