[ofw] RE: Patch: Avoid a crash in an ASSERT during a WHQL test.

Smith, Stan stan.smith at intel.com
Mon Oct 13 08:39:31 PDT 2008


Hello,
  A few small questions.

Under what conditions is the p_parent_ext == NULL?

Why is it OK in the free build to proceed with a NULL p_parent_ext?

Should the code read something like

if ( !p_bfi->p_ext_p_parent_ext )
    return Some-Useful_Return-Code;

thanks,

stan.

________________________________
From: ofw-bounces at lists.openfabrics.org [mailto:ofw-bounces at lists.openfabrics.org] On Behalf Of Tzachi Dar
Sent: Sunday, October 12, 2008 6:10 AM
To: ofw at lists.openfabrics.org
Subject: [ofw] Patch: Avoid a crash in an ASSERT during a WHQL test.

Index: Q:/projinf4/trunk/core/bus/kernel/bus_port_mgr.c
===================================================================
--- Q:/projinf4/trunk/core/bus/kernel/bus_port_mgr.c (revision 3307)
+++ Q:/projinf4/trunk/core/bus/kernel/bus_port_mgr.c (revision 3308)
@@ -1219,7 +1219,9 @@
       ("%s NULL h_ca? p_ext %p\n", p_bfi->whoami, p_ext ) );
   return;
  }
- CL_ASSERT(p_bfi == p_ext->p_parent_ext->bus_filter);
+
+ // Don't crash if p_ext->p_parent_ext is NULL
+ CL_ASSERT((p_ext->p_parent_ext == NULL) || p_bfi == p_ext->p_parent_ext->bus_filter);

  cl_mutex_acquire( &gp_port_mgr->pdo_mutex );
  CL_ASSERT( p_ext->h_ca );
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20081013/ed6c4139/attachment.html>


More information about the ofw mailing list