[PATCH 2/2] opensm/osm_torus.c: Handle calloc() failure on routing engine context creation.

2010-09-17 Thread Jim Schutt
Hal Rosenstock pointed out this calloc() could fail.

Signed-off-by: Jim Schutt jasc...@sandia.gov
---
 opensm/opensm/osm_torus.c |8 +++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/opensm/opensm/osm_torus.c b/opensm/opensm/osm_torus.c
index 12b480d..3b67f16 100644
--- a/opensm/opensm/osm_torus.c
+++ b/opensm/opensm/osm_torus.c
@@ -410,7 +410,11 @@ struct torus_context *torus_context_create(osm_opensm_t 
*osm)
struct torus_context *ctx;
 
ctx = calloc(1, sizeof(*ctx));
-   ctx-osm = osm;
+   if (ctx)
+   ctx-osm = osm;
+   else
+   OSM_LOG(osm-log, OSM_LOG_ERROR,
+   Error: calloc: %s\n, strerror(errno));
 
return ctx;
 }
@@ -9113,6 +9117,8 @@ int osm_ucast_torus2QoS_setup(struct osm_routing_engine 
*r,
struct torus_context *ctx;
 
ctx = torus_context_create(osm);
+   if (!ctx)
+   return -1;
 
r-context = ctx;
r-ucast_build_fwd_tables = torus_build_lfts;
-- 
1.6.2.2


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


[PATCH 2.6.37 0/2] cxgb4 fixes / enhancements.

2010-09-17 Thread Steve Wise
Here are 2 more fixes for 2.6.37.  These two resolve all the known fastreg
issues for T4.

Steve Wise (2):
  RDMA/cxgb4: Fastreg NSMR fixes.
  RDMA/cxgb4: Don't set completion flag for read requests.


 drivers/infiniband/hw/cxgb4/provider.c |4 +-
 drivers/infiniband/hw/cxgb4/qp.c   |   54 +++-
 drivers/infiniband/hw/cxgb4/t4.h   |4 +-
 3 files changed, 30 insertions(+), 32 deletions(-)

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