From patchwork Mon Dec 3 15:26:15 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hal Rosenstock X-Patchwork-Id: 1834311 X-Patchwork-Delegate: alexne@voltaire.com Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 26DC9DF2F9 for ; Mon, 3 Dec 2012 15:26:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754613Ab2LCP0U (ORCPT ); Mon, 3 Dec 2012 10:26:20 -0500 Received: from mail-la0-f46.google.com ([209.85.215.46]:40738 "EHLO mail-la0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754751Ab2LCP0T (ORCPT ); Mon, 3 Dec 2012 10:26:19 -0500 Received: by mail-la0-f46.google.com with SMTP id p5so2365349lag.19 for ; Mon, 03 Dec 2012 07:26:18 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :content-type:content-transfer-encoding:x-gm-message-state; bh=eN9l0lEkuYnijkriEBvF8fio44Is4HKK2sUxj+JCODM=; b=bqZ2qLJXXToleScTUs1GTLFYsPCaRE01D12NJzcRMdfVPdC2a4i7Tphy+sh4jQdon/ 1fqjtAa4CAS2aRuYALNv7G0UbPmwnsJNptt4EFyzHVc5g0yfIA7CxGSC4b/0VnufsH90 BsSZ2eJvnfo1U6qt96GcWxJuw1NRlOpt4jHg76CpoHeJKkFBbLjRAV/+QKo4v0Lqg3Zq BWOK2wsH0nOQWAbTadhwp1aHsSyhvjn1E9vJtnLRAJDij/TSOGY87oep5rAiYRfZcICO n2v2CZG0UZHtfDPUpsg8MW6ihK2TVLS3xzB3rKk6gPOig9cNT9QpikEqDWM6rdPHkjAr FLpQ== Received: by 10.112.49.97 with SMTP id t1mr4424650lbn.58.1354548378711; Mon, 03 Dec 2012 07:26:18 -0800 (PST) Received: from [192.168.1.102] (c-71-192-10-85.hsd1.ma.comcast.net. [71.192.10.85]) by mx.google.com with ESMTPS id sx3sm5470412lab.9.2012.12.03.07.26.17 (version=SSLv3 cipher=OTHER); Mon, 03 Dec 2012 07:26:18 -0800 (PST) Message-ID: <50BCC497.2030207@dev.mellanox.co.il> Date: Mon, 03 Dec 2012 10:26:15 -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: Alex Netes CC: "linux-rdma (linux-rdma@vger.kernel.org)" , Jim Schutt Subject: [PATCH] opensm/osm_torus.c: Fix crash in torus_update_osm_vlarb X-Gm-Message-State: ALoCoQlTjBsD2/yrCgL4mtO7U64QH+4RQCWD7YDuY6ru9VgNFJurFhRGCO3qrXpafda6Y6Euk3Oa Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Signed-off-by: Alex Netes Signed-off-by: Hal Rosenstock --- opensm/osm_torus.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/opensm/osm_torus.c b/opensm/osm_torus.c index c06f8d4..075f84a 100644 --- a/opensm/osm_torus.c +++ b/opensm/osm_torus.c @@ -8089,7 +8089,7 @@ void torus_update_osm_vlarb(void *context, osm_physp_t *osm_phys_port, * So, leave VL 0 alone, remap VL 4 to VL 1, zero out the rest, * and compress out the zero entries to the end. */ - if (!sw || !port_num || + if (!sw || !port_num || sw->port[port_num] || sw->port[port_num]->pgrp->port_grp != 2 * TORUS_MAX_DIM) return;