[ofa-general] [PATCH] osm: fixing coredump in drop manager

Yevgeny Kliteynik kliteyn at dev.mellanox.co.il
Mon May 21 04:53:59 PDT 2007


Hi Hal.

This patch fixes a coredump in a drop manager when trying to clear
unititialized physical ports.
It happens only in master (the code in this area is a bit different in ofed_1_2).

Please apply to master.
Thanks.

Signed-off-by: Yevgeny Kliteynik <kliteyn at dev.mellanox.co.il>
---
 opensm/opensm/osm_drop_mgr.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/opensm/opensm/osm_drop_mgr.c b/opensm/opensm/osm_drop_mgr.c
index 97a95c2..7ec185c 100644
--- a/opensm/opensm/osm_drop_mgr.c
+++ b/opensm/opensm/osm_drop_mgr.c
@@ -242,7 +242,7 @@ __osm_drop_mgr_remove_port(
   {
     p_physp = osm_node_get_physp_ptr( p_port->p_node, (uint8_t)port_num );
 
-    if( p_physp )
+    if( p_physp && osm_physp_is_valid(p_physp) )
     {
       p_remote_physp = osm_physp_get_remote( p_physp );
       if( p_remote_physp && osm_physp_is_valid( p_remote_physp ) )
-- 
1.5.1.4




More information about the general mailing list