From patchwork Sat Dec 20 18:22:24 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vangelis Tasoulas X-Patchwork-Id: 5523091 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 39D919F1CD for ; Sat, 20 Dec 2014 18:22:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 821E120160 for ; Sat, 20 Dec 2014 18:22:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1057120158 for ; Sat, 20 Dec 2014 18:22:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750831AbaLTSWd (ORCPT ); Sat, 20 Dec 2014 13:22:33 -0500 Received: from mail-lb0-f174.google.com ([209.85.217.174]:51480 "EHLO mail-lb0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750785AbaLTSWd (ORCPT ); Sat, 20 Dec 2014 13:22:33 -0500 Received: by mail-lb0-f174.google.com with SMTP id 10so2310054lbg.33 for ; Sat, 20 Dec 2014 10:22:31 -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; bh=MpDDAP2TDTNYEa/p8kZdFWU9UgkW52d9mpOFrRK/1lw=; b=KRHpkp0BqrewEub6vUms8Te1HP10tvSDcE4oj4Jw0Zf5FflakaI3gN843742MidtJ4 n2f8rRJSHXJlTIIHaphzi2llqPGeB7Kt6bCI/pjSGssmYbLwv5nTXT8K2D2Bj3oIQ6Uq s2Cs3tDla7uscDCjlo7w6hnVRq4+IOXNHPWba2XHN6wypV7yZMoyzomEEpRw647dypJj n3qNfw5ETP//eeVTE6woekMSXUm3gdbrVV6Vj9O4pohpTECeKgOYISxboPKlRsN7rouG ngdAtH2sDJeHLAd9Zmgb97rDEQEnDhlnOARb0BlaV+QtqL+ngmivGPhdrjxyzRFtIszE wXTA== X-Gm-Message-State: ALoCoQng/Feq8rxZfXxRUUZeLvna+PNV0k7oW1qhhl+HkrkzR55aV0luyAbJ3cxTjJzgZXr1u6e9 X-Received: by 10.152.36.1 with SMTP id m1mr13726751laj.95.1419099751617; Sat, 20 Dec 2014 10:22:31 -0800 (PST) Received: from [192.168.1.100] (142.37-191-135.fiber.lynet.no. [37.191.135.142]) by mx.google.com with ESMTPSA id d1sm2202061laf.47.2014.12.20.10.22.29 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 20 Dec 2014 10:22:30 -0800 (PST) Message-ID: <5495BE60.50301@simula.no> Date: Sat, 20 Dec 2014 19:22:24 +0100 From: Vangelis Tasoulas User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Hal Rosenstock CC: Linux RDMA Mailing List Subject: [PATCH] Fixes wrong assertion failed in osm_switch_get_lft_block() Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, T_TVD_MIME_EPI, 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 a399cd7398a86b72541c628588365c252882cd80 Mon Sep 17 00:00:00 2001 From: Vangelis Tasoulas Date: Sat, 20 Dec 2014 19:10:33 +0100 Subject: [PATCH] Fixes wrong assertion failed in osm_switch_get_lft_block() when LIDs from the top LFT block (0xbfc0-0xbfff) are used. --- opensm/osm_switch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) return TRUE; } From a399cd7398a86b72541c628588365c252882cd80 Mon Sep 17 00:00:00 2001 From: Vangelis Tasoulas Date: Sat, 20 Dec 2014 19:10:33 +0100 Subject: [PATCH] Fixes wrong assertion failed in osm_switch_get_lft_block() when LIDs from the top LFT block (0xbfc0-0xbfff) are used. --- opensm/osm_switch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opensm/osm_switch.c b/opensm/osm_switch.c index 11efd54..a28ec28 100644 --- a/opensm/osm_switch.c +++ b/opensm/osm_switch.c @@ -168,7 +168,7 @@ boolean_t osm_switch_get_lft_block(IN const osm_switch_t * p_sw, if (base_lid_ho > p_sw->max_lid_ho) return FALSE; - CL_ASSERT(base_lid_ho + IB_SMP_DATA_SIZE <= IB_LID_UCAST_END_HO); + CL_ASSERT(base_lid_ho + IB_SMP_DATA_SIZE - 1 <= IB_LID_UCAST_END_HO); memcpy(p_block, &(p_sw->lft[base_lid_ho]), IB_SMP_DATA_SIZE); return TRUE; } -- 1.9.1