[ofa-general] [PATCH] infiniband-diags/grouping.c: For Xsigo grouping, fix seg fault when no peer port
Hal Rosenstock
hrosenstock at xsigo.com
Sat Nov 3 14:58:36 PDT 2007
infiniband-diags/grouping.c: For Xsigo grouping, fix seg fault when no
peer port
Signed-off-by: Hal Rosenstock <hal at xsigo.com>
diff --git a/infiniband-diags/src/grouping.c b/infiniband-diags/src/grouping.c
index 621d49e..86fd810 100644
--- a/infiniband-diags/src/grouping.c
+++ b/infiniband-diags/src/grouping.c
@@ -157,6 +157,10 @@ static uint64_t xsigo_chassisguid(Node *node)
else
return node->sysimgguid;
} else {
+ /* Is there a peer port ? */
+ if (!node->ports->remoteport)
+ return node->sysimgguid;
+
/* If peer port is Leaf 1, use its chassis GUID */
if (is_xsigo_leafone(node->ports->remoteport->node->sysimgguid))
return node->ports->remoteport->node->sysimgguid &
More information about the general
mailing list