[ofw] Assert in checked ibbus driver?

Sean Hefty sean.hefty at intel.com
Wed Jun 18 18:29:54 PDT 2008


Looking at that assert, it could give a false positive.  Maybe this assertion
should be converted into a warning, or more complete check that searches for the
item in the list when it's hit?

 

 

Can someone shed some light on the following assert I saw in checked build
driver?

 

It happened in the function cl_qlist_insert_head() when a new item is added to
the list. And the assertion happens because it thinks the item is already in the
list. However when checking the list item, I don't see it is linked because its
previous and next pointers are both NULL. The item is also is not in the list by
manually checking the list.

 

Is this because the item is not initialized properly as it's said in the
comments, or it's a true bug? 

 

Thanks,

James

 

----------------------

CL_INLINE void CL_API

cl_qlist_insert_head(

      IN    cl_qlist_t* const       p_list,

      IN    cl_list_item_t* const   p_list_item )

{

      /* CL_ASSERT that a non-null pointer is provided. */

      CL_ASSERT( p_list );

      /* CL_ASSERT that a non-null pointer is provided. */

      CL_ASSERT( p_list_item );

      /* CL_ASSERT that the list was initialized. */

      CL_ASSERT( p_list->state == CL_INITIALIZED );

 

      /*

       * The list item must not already be part of the list.  Note that this

       * assertion may fail if an uninitialized list item happens to have its

       * list pointer equal to the specified list.  The chances of this

       * happening are acceptable in light of the value of this check.

       */

      CL_ASSERT( p_list_item->p_list != p_list );

 

#if defined( _DEBUG_ )

      p_list_item->p_list = p_list;

#endif

 

      /* Insert before the head. */

      __cl_primitive_insert( cl_qlist_head( p_list ), p_list_item );

 

      p_list->count++;

}

 

 

1: kd> k

ChildEBP RetAddr  

f795e9fc 80873922 nt!DbgBreakPoint

f795ece4 f71588c4 nt!RtlAssert+0xba

f795ed0c f715a5df ibbus!cl_qlist_insert_head+0xb4
[k:\windows-openib\inc\complib\cl_qlist.h @ 782]

f795ed24 f71b08da ibbus!__cl_free_trk+0x6f
[k:\windows-openib\\core\complib\cl_memory.c @ 342]

f795ed38 f7218e8d ibbus!__pnp_reg_free+0xfa
[k:\windows-openib\\core\al\kernel\al_pnp.c @ 386]

f795ed70 f715c0e4 ibbus!async_destroy_cb+0x72d
[k:\windows-openib\\core\al\al_common.c @ 685]

f795ed8c f7162534 ibbus!__cl_async_proc_worker+0x94
[k:\windows-openib\core\complib\cl_async_proc.c @ 153]

f795eda0 f71645ec ibbus!__cl_thread_pool_routine+0x54
[k:\windows-openib\core\complib\cl_threadpool.c @ 67]

f795edac 80949b7c ibbus!__thread_callback+0x2c
[k:\windows-openib\core\complib\kernel\cl_thread.c @ 49]

f795eddc 8088e062 nt!PspSystemThreadStartup+0x2e

00000000 00000000 nt!KiThreadStartup+0x16

 

1: kd> dt 0x863416a0 _cl_qlist 

   +0x000 end              : _cl_list_item

   +0x00c count            : 0x29

   +0x010 state            : 2 ( CL_INITIALIZED )

1: kd> dt 0x85485268 _cl_list_item 

   +0x000 p_next           : (null) 

   +0x004 p_prev           : (null) 

   +0x008 p_list           : 0x863416a0 _cl_qlist

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20080618/bf08daf9/attachment.html>


More information about the ofw mailing list