mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-22 08:23:05 -05:00
sys: POOL_NX_OPTIN
This commit is contained in:
parent
08c283f2a9
commit
40735c4687
@ -176,6 +176,8 @@ NTSTATUS DriverEntry(
|
||||
|
||||
static VOID FspDriverMultiVersionInitialize(VOID)
|
||||
{
|
||||
ExInitializeDriverRuntime(DrvRtPoolNxOptIn);
|
||||
|
||||
if (RtlIsNtDdiVersionAvailable(NTDDI_WIN7))
|
||||
{
|
||||
UNICODE_STRING Name;
|
||||
|
@ -19,6 +19,8 @@
|
||||
#define WINFSP_SYS_DRIVER_H_INCLUDED
|
||||
|
||||
#define WINFSP_SYS_INTERNAL
|
||||
|
||||
#define POOL_NX_OPTIN 1
|
||||
#include <ntifs.h>
|
||||
#include <ntstrsafe.h>
|
||||
#include <wdmsec.h>
|
||||
|
@ -851,8 +851,13 @@ NTSTATUS FspSafeMdlCreate(PMDL UserMdl, LOCK_OPERATION Operation, FSP_SAFE_MDL *
|
||||
{
|
||||
PAGED_CODE();
|
||||
|
||||
NTSTATUS Result;
|
||||
*PSafeMdl = 0;
|
||||
|
||||
PVOID VirtualAddress = MmGetSystemAddressForMdlSafe(UserMdl, NormalPagePriority);
|
||||
if (0 == VirtualAddress)
|
||||
return STATUS_INSUFFICIENT_RESOURCES;
|
||||
|
||||
NTSTATUS Result;
|
||||
ULONG ByteCount = MmGetMdlByteCount(UserMdl);
|
||||
ULONG PageCount = ADDRESS_AND_SIZE_TO_SPAN_PAGES(VirtualAddress, ByteCount);
|
||||
FSP_SAFE_MDL *SafeMdl;
|
||||
@ -865,8 +870,6 @@ NTSTATUS FspSafeMdlCreate(PMDL UserMdl, LOCK_OPERATION Operation, FSP_SAFE_MDL *
|
||||
ASSERT(0 != PageCount);
|
||||
ASSERT(FlagOn(UserMdl->MdlFlags, MDL_SOURCE_IS_NONPAGED_POOL | MDL_PAGES_LOCKED));
|
||||
|
||||
*PSafeMdl = 0;
|
||||
|
||||
SafeMdl = FspAllocNonPaged(sizeof *SafeMdl);
|
||||
if (0 == SafeMdl)
|
||||
{
|
||||
@ -996,6 +999,9 @@ VOID FspSafeMdlCopyBack(FSP_SAFE_MDL *SafeMdl)
|
||||
return;
|
||||
|
||||
PVOID VirtualAddress = MmGetSystemAddressForMdlSafe(SafeMdl->UserMdl, NormalPagePriority);
|
||||
if (0 == VirtualAddress)
|
||||
return; /* should never happen, already checked in FspSafeMdlCreate */
|
||||
|
||||
ULONG ByteCount = MmGetMdlByteCount(SafeMdl->UserMdl);
|
||||
ULONG PageCount = ADDRESS_AND_SIZE_TO_SPAN_PAGES(VirtualAddress, ByteCount);
|
||||
ULONG ByteOffsetBgn0, ByteOffsetEnd0, ByteOffsetEnd1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user