[openib-general] Re[PATCH] Opensm - fix segfault on exit - cont. #2

Yael Kalka yael at mellanox.co.il
Wed Dec 21 05:29:57 PST 2005


Hi Hal,

As I wrote in the original thread - when the driver isn't loaded, 
the p_ur itself is NULL, so before trying to destroy the signal,
we need to make sure the p_ur isn't null. If it is not null, this
means it was initialized, and p_ur->signal should have a value.
The following patch does this.

Thanks,
Yael

Signed-off-by:  Yael Kalka <yael at mellanox.co.il>

Index: libvendor/osm_vendor_ibumad.c
===================================================================
--- libvendor/osm_vendor_ibumad.c       (revision 4542)
+++ libvendor/osm_vendor_ibumad.c       (working copy)
@@ -552,7 +552,7 @@ osm_vendor_delete(
 
        /* umad receiver thread ? */
        p_ur = (*pp_vend)->receiver;
-       if (&p_ur->signal)
+       if ( p_ur )
                cl_event_destroy( &p_ur->signal );
        cl_spinlock_destroy( &(*pp_vend)->cb_lock );
        cl_spinlock_destroy( &(*pp_vend)->match_tbl_lock );




More information about the general mailing list