[ofa-general] [PATCH] osm/osm_mcast_mgr.c: coredump in ofed_1_2

Yevgeny Kliteynik kliteyn at dev.mellanox.co.il
Wed Dec 26 03:51:36 PST 2007


Hi Sasha,

Protecting against possible NULL returned by osm_node_get_remote_node().

Please apply this fix to branch ofed_1_2 only.
It appears that this coredump has already been fixed for ofed_1_3.

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

diff --git a/osm/opensm/osm_mcast_mgr.c b/osm/opensm/osm_mcast_mgr.c
index 28c4dcd..51d948f 100644
--- a/osm/opensm/osm_mcast_mgr.c
+++ b/osm/opensm/osm_mcast_mgr.c
@@ -814,6 +814,8 @@ __osm_mcast_mgr_branch(

     p_node = p_sw->p_node;
     p_remote_node = osm_node_get_remote_node( p_node, i, NULL );
+    if (!p_remote_node)
+      continue;

     if( osm_node_get_type( p_remote_node ) == IB_NODE_TYPE_SWITCH )
     {
-- 
1.5.1.4




More information about the general mailing list