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

Signed-off-by: Fab Tillier <[email protected]>

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  ) ||

Attachment: ndv2.52.patch
Description: ndv2.52.patch

_______________________________________________
ofw mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw

Reply via email to