Mysterious Windows 10 driver verifier assertion

Check the documentation on the POOL_TYPE parameter. On Windows 8 and later, you should use NonPagedPoolNx instead of NonPagedPool, as the latter is now equivalent to NonPagedPoolExecute which will give you a block of executable memory (which presumably you don’t really need).

Jeff