From patchwork Wed Sep 30 15:43:41 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hal Rosenstock X-Patchwork-Id: 50719 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n8UFjT3h024032 for ; Wed, 30 Sep 2009 15:45:29 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754557AbZI3PpZ (ORCPT ); Wed, 30 Sep 2009 11:45:25 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754601AbZI3PpZ (ORCPT ); Wed, 30 Sep 2009 11:45:25 -0400 Received: from qmta03.westchester.pa.mail.comcast.net ([76.96.62.32]:55564 "EHLO QMTA03.westchester.pa.mail.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754557AbZI3PpY (ORCPT ); Wed, 30 Sep 2009 11:45:24 -0400 Received: from OMTA04.westchester.pa.mail.comcast.net ([76.96.62.35]) by QMTA03.westchester.pa.mail.comcast.net with comcast id n3VA1c00C0ldTLk533jh7j; Wed, 30 Sep 2009 15:43:41 +0000 Received: from hal.comcast.net ([75.69.247.31]) by OMTA04.westchester.pa.mail.comcast.net with comcast id n3lU1c0030hNrtn3Q3lUkq; Wed, 30 Sep 2009 15:45:29 +0000 Received: from hal.comcast.net (localhost.localdomain [127.0.0.1]) by hal.comcast.net (8.14.3/8.14.3) with ESMTP id n8UFi6gJ031744; Wed, 30 Sep 2009 11:44:11 -0400 Received: (from hnrose@localhost) by hal.comcast.net (8.14.3/8.14.3/Submit) id n8UFhfaA031713; Wed, 30 Sep 2009 11:43:41 -0400 Date: Wed, 30 Sep 2009 11:43:41 -0400 From: Hal Rosenstock To: sashak@voltaire.com Cc: linux-rdma@vger.kernel.org, general@lists.openfabrics.org Subject: [PATCH] opensm/osm_sa_lft_record.c: In lftr_rcv_new_lftr, handle osm_switch_get_lft_block failure Message-ID: <20090930154341.GA31709@comcast.net> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.19 (2009-01-05) Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org diff --git a/opensm/opensm/osm_sa_lft_record.c b/opensm/opensm/osm_sa_lft_record.c index d092129..828b277 100644 --- a/opensm/opensm/osm_sa_lft_record.c +++ b/opensm/opensm/osm_sa_lft_record.c @@ -99,8 +99,12 @@ static ib_api_status_t lftr_rcv_new_lftr(IN osm_sa_t * sa, p_rec_item->rec.block_num = cl_hton16(block); /* copy the lft block */ - osm_switch_get_lft_block(p_sw, block, p_rec_item->rec.lft); - + if (!osm_switch_get_lft_block(p_sw, block, p_rec_item->rec.lft)) { + OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 4403: " + "osm_switch_get_lft_block failed\n"); + status = IB_INSUFFICIENT_RESOURCES; + goto Exit; + } cl_qlist_insert_tail(p_list, &p_rec_item->list_item); Exit: