diff mbox

opensm: fixed segfault when enable qos on fabric with no switches

Message ID 20110413075200.GC1529@calypso.voltaire.com (mailing list archive)
State Accepted
Headers show

Commit Message

Alex Netes April 13, 2011, 7:52 a.m. UTC
Signed-off-by: Alex Netes <alexne@mellanox.com>
---
 opensm/osm_qos.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Jim Schutt April 13, 2011, 2:35 p.m. UTC | #1
Alex Netes wrote:
> Signed-off-by: Alex Netes <alexne@mellanox.com>
> ---
>  opensm/osm_qos.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Acked-by: Jim Schutt <jaschut@sandia.gov>

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/opensm/osm_qos.c b/opensm/osm_qos.c
index afea7bb..f353275 100644
--- a/opensm/osm_qos.c
+++ b/opensm/osm_qos.c
@@ -292,7 +292,7 @@  static int qos_endport_setup(osm_sm_t * sm, osm_physp_t * p,
 	if (!(p->port_info.capability_mask & IB_PORT_CAP_HAS_SL_MAP))
 		return 0;
 
-	if (re->update_sl2vl) {
+	if (re && re->update_sl2vl) {
 		routing_sl2vl = *port_sl2vl;
 		re->update_sl2vl(re->context, p, 0, 0, &routing_sl2vl);
 		port_sl2vl = &routing_sl2vl;