winverbs: ensure that event and mutex memory are resident
authorshefty <shefty@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Wed, 26 Aug 2009 16:47:11 +0000 (16:47 +0000)
committershefty <shefty@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Wed, 26 Aug 2009 16:47:11 +0000 (16:47 +0000)
The winverbs PD structure contains both an event and a guarded mutex.  Both must
be allocated as part of resident memory, or vague system corruptions may occur
if their memory is paged out.

The fix is to allocate the PD structure from NonPagedPool.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@2384 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

core/winverbs/kernel/wv_pd.c

index 304588d..5ce0c20 100644 (file)
@@ -74,7 +74,7 @@ static NTSTATUS WvPdAlloc(WV_DEVICE *pDevice, WV_PROTECTION_DOMAIN **ppPd,
        ib_api_status_t                 ib_status;\r
        WV_PROTECTION_DOMAIN    *pd;\r
 \r
-       pd = ExAllocatePoolWithTag(PagedPool, sizeof(WV_PROTECTION_DOMAIN), 'dpvw');\r
+       pd = ExAllocatePoolWithTag(NonPagedPool, sizeof(WV_PROTECTION_DOMAIN), 'dpvw');\r
        if (pd == NULL) {\r
                return STATUS_NO_MEMORY;\r
        }\r