From patchwork Sun Apr 18 04:50:20 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Khapyorsky X-Patchwork-Id: 93334 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o3I4oE9e024528 for ; Sun, 18 Apr 2010 04:50:14 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751119Ab0DREuE (ORCPT ); Sun, 18 Apr 2010 00:50:04 -0400 Received: from mail-wy0-f174.google.com ([74.125.82.174]:39974 "EHLO mail-wy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750978Ab0DREuD (ORCPT ); Sun, 18 Apr 2010 00:50:03 -0400 Received: by wyb39 with SMTP id 39so1890827wyb.19 for ; Sat, 17 Apr 2010 21:50:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:received:date:from:to :subject:message-id:mime-version:content-type:content-disposition :user-agent; bh=Kr0Lw14Du0hnBCvxrqsNPDb4+TmaeE1Q0bQSWwb3D34=; b=ADGnG56H5IamMEox0erYtyW2kYwQeSKBmufNBCs031zf3krmf2ieklonw0u9tKn2g4 lVtIQSESDahr5BNJvaGVWhSDkyLUNTuSxdhoNatqTPX/f0uxST/2CI9nO/9IE/kjfqrW qAoEOqpbFaux18DRRuisbULXuNRoqRwzo1+gU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:date:from:to:subject:message-id:mime-version:content-type :content-disposition:user-agent; b=w/B86GHB8fy1tI1sa5ESfxE4N3wiDdFpXVXIFDfj5Vf1b+DhO7hfmqPjrJ3yfy1jZ+ RZaZh5DYc8jZtnsufj0SG/wLY9Z9DgmCuWJ4Lx+Ckf91OWtGbi69hJvfjTHp7nzA6b8/ Pu/omGT5ZjXmcIUiwRYx6UZES5YxuPdcD3Ow8= Received: by 10.216.91.18 with SMTP id g18mr4758322wef.203.1271566201636; Sat, 17 Apr 2010 21:50:01 -0700 (PDT) Received: from me.localdomain (85.64.35.106.dynamic.barak-online.net [85.64.35.106]) by mx.google.com with ESMTPS id x14sm36152072wbs.12.2010.04.17.21.50.00 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 17 Apr 2010 21:50:00 -0700 (PDT) Received: by me.localdomain (Postfix, from userid 1000) id E67D811DF6; Sun, 18 Apr 2010 07:50:20 +0300 (IDT) Date: Sun, 18 Apr 2010 07:50:20 +0300 From: Sasha Khapyorsky To: linux-rdma Subject: [PATCH] opensm/vendor: fix portguids array size Message-ID: <20100418045020.GD11943@me> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Sun, 18 Apr 2010 04:50:14 +0000 (UTC) diff --git a/opensm/libvendor/osm_vendor_ibumad.c b/opensm/libvendor/osm_vendor_ibumad.c index bcddba4..eac686a 100644 --- a/opensm/libvendor/osm_vendor_ibumad.c +++ b/opensm/libvendor/osm_vendor_ibumad.c @@ -637,9 +637,8 @@ osm_vendor_open_port(IN osm_vendor_t * const p_vend, } for (ca = 0; ca < p_vend->ca_count; ca++) { - if ((r = umad_get_ca_portguids(p_vend->ca_names[ca], - portguids, - OSM_UMAD_MAX_CAS)) < 0) { + if ((r = umad_get_ca_portguids(p_vend->ca_names[ca], portguids, + OSM_UMAD_MAX_PORTS_PER_CA + 1)) < 0) { OSM_LOG(p_vend->p_log, OSM_LOG_ERROR, "ERR 5421: " "Unable to get CA %s port guids (%s)\n", p_vend->ca_names[ca], strerror(r));