[ofw] [Patch 52/62] Reference implementation of NDv2

Fab Tillier ftillier at microsoft.com
Wed Feb 20 20:58:14 PST 2013


Don't deref NULL to cause a crash, call KeBugCheck instead.

Signed-off-by: Fab Tillier <ftillier at microsoft.com>

diff -dwup3 -X excl.txt -I ^ \*$ -I ^ \* \$ -r \dev\openib\Mellanox\10916\hw\mlx4\kernel\genutils\gu_utils.cpp .\hw\mlx4\kernel\genutils\gu_utils.cpp
--- \dev\openib\Mellanox\10916\hw\mlx4\kernel\genutils\gu_utils.cpp	Mon Sep 10 11:47:16 2012
+++ .\hw\mlx4\kernel\genutils\gu_utils.cpp	Mon Sep 10 16:26:51 2012
@@ -15,6 +15,7 @@ Notes:
 --*/
 
 #include "gu_precomp.h"
+#include <bugcodes.h>
 
 #ifdef offsetof
 #undef offsetof
@@ -715,9 +716,7 @@ NTSTATUS 
         if (!NT_SUCCESS(rc)) {
             ASSERT(FALSE);
             GU_PRINT(TRACE_LEVEL_ERROR ,GU ,"KeWaitForSingleObject failed rc = 0x%x\n", rc );
-            // No meter what we do the program can't continue, let's crush it
-            int *i = NULL;
-            *i = 5;
+            KeBugCheck(CRITICAL_SERVICE_FAILED);
         }
         ASSERT((rc == STATUS_SUCCESS ) ||
                (rc == STATUS_ALERTED  ) ||
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ndv2.52.patch
Type: application/octet-stream
Size: 911 bytes
Desc: ndv2.52.patch
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20130221/1923aba3/attachment.obj>


More information about the ofw mailing list