[openib-general] [PATCH] Opensm - fix segfault on exit

Yael Kalka yael at mellanox.co.il
Sun Dec 4 01:44:10 PST 2005


Hi Hal,

If the driver isn't loaded, opensm exits with segfault. This is since
it tries destroying the signal event in the osm_vendor, but due to the
failure - this event wasn't created.
The following patch fixes 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 4281)
+++ libvendor/osm_vendor_ibumad.c	(working copy)
@@ -552,6 +552,7 @@ osm_vendor_delete(
 
 	/* umad receiver thread ? */
 	p_ur = (*pp_vend)->receiver;
+	if (&p_ur->signal)
 	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