<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16705" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=379525615-15102008><FONT face=Arial color=#0000ff 
size=2>Hello,</FONT></SPAN></DIV>
<DIV><SPAN class=379525615-15102008><FONT face=Arial color=#0000ff size=2>  
Thanks for the explanation. Seems the CL_ASSERT() was residual debug code I 
should have removed long ago.</FONT></SPAN></DIV>
<DIV><SPAN class=379525615-15102008><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=379525615-15102008><FONT face=Arial color=#0000ff 
size=2>stan.</FONT></SPAN></DIV>
<DIV><SPAN class=379525615-15102008><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN> </DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> Tzachi Dar [mailto:tzachid@mellanox.co.il] 
<BR><B>Sent:</B> Wednesday, October 15, 2008 8:37 AM<BR><B>To:</B> Smith, Stan; 
ofw@lists.openfabrics.org<BR><B>Subject:</B> RE: Patch: Avoid a crash in an 
ASSERT during a WHQL test.<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV><SPAN class=577243015-15102008><FONT face=Arial color=#0000ff size=2>Hi 
Stan,</FONT></SPAN></DIV>
<DIV><SPAN class=577243015-15102008><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=577243015-15102008><FONT face=Arial color=#0000ff size=2>I'm 
not sure that I understand your question.</FONT></SPAN></DIV>
<DIV><SPAN class=577243015-15102008><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=577243015-15102008><FONT face=Arial color=#0000ff size=2>The 
problem that we had in WHQL was that the assert </FONT></SPAN></DIV>
<DIV><SPAN class=577243015-15102008><FONT face=Arial color=#0000ff 
size=2>CL_ASSERT(p_bfi == 
p_ext->p_parent_ext->bus_filter);</FONT></SPAN></DIV>
<DIV><SPAN class=577243015-15102008><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=577243015-15102008><FONT face=Arial color=#0000ff size=2>Has 
caused</FONT></SPAN><SPAN class=577243015-15102008><FONT face=Arial 
color=#0000ff size=2> a bluescreen. The reason of the bluescreen was because 
p_ext->p_parent_ext was NULL and therefore</FONT></SPAN></DIV>
<DIV><SPAN class=577243015-15102008><FONT face=Arial color=#0000ff 
size=2>looking at p_ext->p_parent_ext->bus_filter</FONT><FONT 
face=Arial><FONT size=2><FONT color=#0000ff> caused a 
bluescreen.</FONT></FONT></FONT></SPAN></DIV>
<DIV><SPAN class=577243015-15102008><FONT face=Arial><FONT size=2><FONT 
color=#0000ff>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</FONT></FONT></FONT></SPAN></DIV>
<DIV><SPAN class=577243015-15102008><FONT face=Arial><FONT size=2><FONT 
color=#0000ff>on free.</FONT></FONT></FONT></SPAN></DIV>
<DIV><SPAN class=577243015-15102008><FONT face=Arial><FONT size=2><FONT 
color=#0000ff></FONT></FONT></FONT></SPAN> </DIV>
<DIV><SPAN class=577243015-15102008><FONT face=Arial><FONT size=2><FONT 
color=#0000ff>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.</FONT></FONT></FONT></SPAN></DIV>
<DIV><SPAN class=577243015-15102008><FONT face=Arial><FONT size=2><FONT 
color=#0000ff></FONT></FONT></FONT></SPAN> </DIV>
<DIV><SPAN class=577243015-15102008><FONT face=Arial><FONT size=2><FONT 
color=#0000ff>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.</FONT></FONT></FONT></SPAN></DIV>
<DIV><SPAN class=577243015-15102008><FONT face=Arial><FONT size=2><FONT 
color=#0000ff></FONT></FONT></FONT></SPAN> </DIV>
<DIV><SPAN class=577243015-15102008><FONT face=Arial><FONT size=2><FONT 
color=#0000ff>Thanks</FONT></FONT></FONT></SPAN></DIV>
<DIV><SPAN class=577243015-15102008><FONT face=Arial><FONT size=2><FONT 
color=#0000ff>Tzachi</SPAN></DIV></FONT></FONT></FONT><BR>
<BLOCKQUOTE dir=ltr 
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
  <DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
  <HR tabIndex=-1>
  <FONT face=Tahoma size=2><B>From:</B> Smith, Stan 
  [mailto:stan.smith@intel.com] <BR><B>Sent:</B> Monday, October 13, 2008 5:40 
  PM<BR><B>To:</B> Tzachi Dar; ofw@lists.openfabrics.org<BR><B>Subject:</B> RE: 
  Patch: Avoid a crash in an ASSERT during a WHQL test.<BR></FONT><BR></DIV>
  <DIV></DIV>
  <DIV><SPAN class=260503515-13102008><FONT face=Arial color=#0000ff 
  size=2>Hello,</FONT></SPAN></DIV>
  <DIV><SPAN class=260503515-13102008><FONT face=Arial color=#0000ff 
  size=2>  A few small questions.</FONT></SPAN></DIV>
  <DIV><SPAN class=260503515-13102008><FONT face=Arial color=#0000ff 
  size=2></FONT></SPAN> </DIV>
  <DIV><SPAN class=260503515-13102008><FONT face=Arial color=#0000ff 
  size=2>Under what conditions is the p_parent_ext == NULL?</FONT></SPAN></DIV>
  <DIV><SPAN class=260503515-13102008><FONT face=Arial color=#0000ff 
  size=2></FONT></SPAN> </DIV>
  <DIV><SPAN class=260503515-13102008><FONT face=Arial color=#0000ff size=2>Why 
  is it OK in the free build to proceed with a NULL 
  p_parent_ext?</FONT></SPAN></DIV>
  <DIV><SPAN class=260503515-13102008><FONT face=Arial color=#0000ff 
  size=2></FONT></SPAN> </DIV>
  <DIV><SPAN class=260503515-13102008><FONT face=Arial color=#0000ff 
  size=2>Should the code read something like</FONT></SPAN></DIV>
  <DIV><SPAN class=260503515-13102008><FONT face=Arial color=#0000ff 
  size=2></FONT></SPAN> </DIV>
  <DIV><SPAN class=260503515-13102008><FONT face=Arial color=#0000ff size=2>if ( 
  !p_bfi->p_ext_p_parent_ext )</FONT></SPAN></DIV>
  <DIV><SPAN class=260503515-13102008>    <FONT face=Arial 
  color=#0000ff size=2>return Some-Useful_Return-Code;</FONT></SPAN></DIV>
  <DIV><SPAN class=260503515-13102008><FONT face=Arial color=#0000ff 
  size=2></FONT></SPAN> </DIV>
  <DIV><SPAN class=260503515-13102008><FONT face=Arial color=#0000ff 
  size=2>thanks,</FONT></SPAN></DIV>
  <DIV><SPAN class=260503515-13102008><FONT face=Arial color=#0000ff 
  size=2></FONT></SPAN> </DIV>
  <DIV><SPAN class=260503515-13102008><FONT face=Arial color=#0000ff 
  size=2>stan.</FONT></SPAN></DIV><BR>
  <DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
  <HR tabIndex=-1>
  <FONT face=Tahoma size=2><B>From:</B> ofw-bounces@lists.openfabrics.org 
  [mailto:ofw-bounces@lists.openfabrics.org] <B>On Behalf Of </B>Tzachi 
  Dar<BR><B>Sent:</B> Sunday, October 12, 2008 6:10 AM<BR><B>To:</B> 
  ofw@lists.openfabrics.org<BR><B>Subject:</B> [ofw] Patch: Avoid a crash in an 
  ASSERT during a WHQL test.<BR></FONT><BR></DIV>
  <DIV></DIV>
  <DIV><FONT face=Arial size=2>Index: 
  Q:/projinf4/trunk/core/bus/kernel/bus_port_mgr.c<BR>===================================================================<BR>--- 
  Q:/projinf4/trunk/core/bus/kernel/bus_port_mgr.c (revision 3307)<BR>+++ 
  Q:/projinf4/trunk/core/bus/kernel/bus_port_mgr.c (revision 3308)<BR>@@ 
  -1219,7 +1219,9 @@<BR>       ("%s NULL 
  h_ca? p_ext %p\n", p_bfi->whoami, p_ext ) 
  );<BR>   return;<BR>  }<BR>- CL_ASSERT(p_bfi == 
  p_ext->p_parent_ext->bus_filter);<BR>+<BR>+ // Don't crash if 
  p_ext->p_parent_ext is NULL<BR>+ CL_ASSERT((p_ext->p_parent_ext == 
  NULL) || p_bfi == 
  p_ext->p_parent_ext->bus_filter);<BR>  <BR>  cl_mutex_acquire( 
  &gp_port_mgr->pdo_mutex );<BR>  CL_ASSERT( p_ext->h_ca 
  );<BR></FONT></DIV></BLOCKQUOTE></BODY></HTML>