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

Smith, Stan stan.smith at intel.com
Wed Oct 15 08:59:03 PDT 2008


Hello,
  Thanks for the explanation. Seems the CL_ASSERT() was residual debug code I should have removed long ago.

stan.


________________________________
From: Tzachi Dar [mailto:tzachid at mellanox.co.il]
Sent: Wednesday, October 15, 2008 8:37 AM
To: Smith, Stan; ofw at lists.openfabrics.org
Subject: RE: Patch: Avoid a crash in an ASSERT during a WHQL test.

Hi Stan,

I'm not sure that I understand your question.

The problem that we had in WHQL was that the assert
CL_ASSERT(p_bfi == p_ext->p_parent_ext->bus_filter);

Has caused a bluescreen. The reason of the bluescreen was because p_ext->p_parent_ext was NULL and therefore
looking at p_ext->p_parent_ext->bus_filter caused a bluescreen.
There was no real use for p_ext->p_parent_ext->bus_filter in the code except for the ASSERT itself which doesn't exist
on free.

So in order to avoid the bluescreen we have added the code that checks that if (p_ext->p_parent_ext == NULL) no more checks will be made and there will be no bluescreen.

Please note that p_parent_ext is not used in this function (except for in the assert) weather it is NULL or not and no meter if this is a chk or free build.

Thanks
Tzachi

________________________________
From: Smith, Stan [mailto:stan.smith at intel.com]
Sent: Monday, October 13, 2008 5:40 PM
To: Tzachi Dar; ofw at lists.openfabrics.org
Subject: RE: Patch: Avoid a crash in an ASSERT during a WHQL test.

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/20081015/7cee0b52/attachment.html>


More information about the ofw mailing list