From patchwork Wed Nov 20 23:26:23 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hal Rosenstock X-Patchwork-Id: 3215951 X-Patchwork-Delegate: hal@mellanox.com Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id EC46F9F26C for ; Wed, 20 Nov 2013 23:26:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 27E2020776 for ; Wed, 20 Nov 2013 23:26:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C55F0206D4 for ; Wed, 20 Nov 2013 23:26:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754934Ab3KTX0a (ORCPT ); Wed, 20 Nov 2013 18:26:30 -0500 Received: from mail-wi0-f174.google.com ([209.85.212.174]:43155 "EHLO mail-wi0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754930Ab3KTX02 (ORCPT ); Wed, 20 Nov 2013 18:26:28 -0500 Received: by mail-wi0-f174.google.com with SMTP id ez12so499205wid.1 for ; Wed, 20 Nov 2013 15:26:27 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:content-type:content-transfer-encoding; bh=wz3CkKlX4w0cpX7zhDYOv2RiKqniTl5V2OJ9h1dFUjM=; b=JycfkZEgqRvBNh9vSYibh8UY9gmTLFY3c71xdLmgPdVoSqbwrBHFRzN/UTmaq7ddxB zKHTXNb1XdHXjKevfv3NJL+tZ+bXh6FlpWfO6PfsU+4dPkcklL8UWbeZ4aa0M5TdF2p4 4YdYXh2VOayDaHpkj6rotd1Jm7qUyPiTe9WrtgnRDviZJ8kkeVAyZekh0ybXqfEvXALV +Y4GWZDhHGqd7ZNQfRgdKk63xPuCdTRtSRaGUdumF/seBygH9griUmB1J2ZJW0VjYrPy KiCUZ8OoKjvdClOwazIl+vjPM9KcTY+mragZSqku5hyvN+BAFKii34vpc7ysvMbbgImE Xcjg== X-Gm-Message-State: ALoCoQnEJXu0cU6cNHKlm5Szm+XLSNbIUxuwq/2oBc/6muR4IWqGal90/OkIg7C02C04k8TAwOwQ X-Received: by 10.194.89.233 with SMTP id br9mr2782893wjb.15.1384989986958; Wed, 20 Nov 2013 15:26:26 -0800 (PST) Received: from [192.168.1.102] (c-98-229-118-119.hsd1.ma.comcast.net. [98.229.118.119]) by mx.google.com with ESMTPSA id je17sm278892wic.4.2013.11.20.15.26.24 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 20 Nov 2013 15:26:25 -0800 (PST) Message-ID: <528D451F.3040404@dev.mellanox.co.il> Date: Wed, 20 Nov 2013 18:26:23 -0500 From: Hal Rosenstock User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:9.0) Gecko/20111222 Thunderbird/9.0.1 MIME-Version: 1.0 To: "linux-rdma (linux-rdma@vger.kernel.org)" CC: Alex Netes Subject: [PATCH opensm] osm_mcast_mgr.c: Fix wrong comparison in mcast_mgr_subdivide() Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Alex Netes port_num must be less than array_size (num of ports on a node). Signed-off-by: Alex Netes --- opensm/osm_mcast_mgr.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/opensm/osm_mcast_mgr.c b/opensm/osm_mcast_mgr.c index 837428b..029ba40 100644 --- a/opensm/osm_mcast_mgr.c +++ b/opensm/osm_mcast_mgr.c @@ -605,7 +605,7 @@ static void mcast_mgr_subdivide(osm_sm_t * sm, uint16_t mlid_ho, continue; } - if (port_num > array_size) { + if (port_num >= array_size) { OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 0A04: " "Error routing MLID 0x%X through switch 0x%" PRIx64 " %s\n" @@ -616,8 +616,6 @@ static void mcast_mgr_subdivide(osm_sm_t * sm, uint16_t mlid_ho, cl_ntoh16(osm_port_get_base_lid (p_wobj->p_port))); mcast_work_obj_delete(p_wobj); - /* This is means OpenSM has a bug. */ - CL_ASSERT(FALSE); continue; }