Skip to contentSkip to conversation

opensm/osm_mcast_mgr.c: fix return value on alloc_mfts() failures

PATCH In review Sasha Khapyorsky 2 participants 3 messages Nov 11, 2009 – Nov 12, 2009 1 message not in the archive InfiniBand

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 opensm/osm_mcast_mgr.c: fix return value on alloc_mfts() failures

When alloc_mfts() fails and multicast routing calculation interrupted return -1 value to a caller.

---
 opensm/opensm/osm_mcast_mgr.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
opensm/opensm/osm_mcast_mgr.c +2 -0
index 105e905..7bd7add 100644
@@ -1066,6 +1066,7 @@ int osm_mcast_mgr_process(osm_sm_t * sm)
 	if (alloc_mfts(sm)) {
 		OSM_LOG(sm->p_log, OSM_LOG_ERROR,
 			"ERR 0A07: alloc_mfts failed\n");
+		ret = -1;
 		goto exit;
 	}
 
@@ -1110,6 +1111,7 @@ int osm_mcast_mgr_process_mgroups(osm_sm_t * sm)
 	if (alloc_mfts(sm)) {
 		OSM_LOG(sm->p_log, OSM_LOG_ERROR,
 			"ERR 0A09: alloc_mfts failed\n");
+		ret = -1;
 		goto exit;
 	}
 
Signature · 6 lines
1.6.5.2

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#1 lore raw
Quoted 3 lines · Sasha Khapyorsky

When alloc_mfts() fails and multicast routing calculation interrupted return -1 value to a caller.

Yes, that fixes the return value but nothing (at least currently) takes advantage of that. Is that the next step ?

-- Hal

Quoted 27 lines

---
 opensm/opensm/osm_mcast_mgr.c |    2 ++

 1 files changed, 2 insertions(+), 0 deletions(-)
opensm/opensm/osm_mcast_mgr.c +2 -1
index 105e905..7bd7add 100644
@@ -1066,6 +1066,7 @@ int osm_mcast_mgr_process(osm_sm_t * sm)
        if (alloc_mfts(sm)) {
                OSM_LOG(sm->p_log, OSM_LOG_ERROR,
                        "ERR 0A07: alloc_mfts failed\n");
+               ret = -1;
                goto exit;
        }
 
@@ -1110,6 +1111,7 @@ int osm_mcast_mgr_process_mgroups(osm_sm_t * sm)
        if (alloc_mfts(sm)) {
                OSM_LOG(sm->p_log, OSM_LOG_ERROR,
                        "ERR 0A09: alloc_mfts failed\n");
+               ret = -1;
                goto exit;
        }
 
--
Quoted 3 lines

1.6.5.2

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

A message that is not in the archive (sent off-list or not yet received): f0e08f230911111225k4b1c30c0y44c13d950d9555b6-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#3 lore raw
Quoted 3 lines · Hal Rosenstock

Yes, that fixes the return value but nothing (at least currently) takes advantage of that. Is that the next step ?

Yes, it should be done this way.

Sasha
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html