From patchwork Wed Aug 1 14:52:33 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jim Foraker X-Patchwork-Id: 1264561 X-Patchwork-Delegate: alexne@voltaire.com Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 376713FC23 for ; Wed, 1 Aug 2012 14:53:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755213Ab2HAOw6 (ORCPT ); Wed, 1 Aug 2012 10:52:58 -0400 Received: from nspiron-1.llnl.gov ([128.115.41.81]:57070 "EHLO nspiron-1.llnl.gov" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754992Ab2HAOw5 (ORCPT ); Wed, 1 Aug 2012 10:52:57 -0400 X-Attachments: Received: from auk75.llnl.gov ([10.253.135.81]) by nspiron-1.llnl.gov with ESMTP; 01 Aug 2012 07:52:54 -0700 From: Jim Foraker To: linux-rdma@vger.kernel.org Cc: weiny2@llnl.gov, alexne@meallanox.com, Jim Foraker Subject: [PATCH 7/9 v2] opensm: Check for valid mkey protection level in config file Date: Wed, 1 Aug 2012 07:52:33 -0700 Message-Id: <1343832755-26753-7-git-send-email-foraker1@llnl.gov> X-Mailer: git-send-email 1.7.9.2 In-Reply-To: <1343832755-26753-1-git-send-email-foraker1@llnl.gov> References: <1343832537.26423.8.camel@auk75.llnl.gov> <1343832755-26753-1-git-send-email-foraker1@llnl.gov> Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Signed-off-by: Jim Foraker --- opensm/osm_subnet.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/opensm/osm_subnet.c b/opensm/osm_subnet.c index 3e923f2..5ae49bb 100644 --- a/opensm/osm_subnet.c +++ b/opensm/osm_subnet.c @@ -2005,6 +2005,13 @@ int osm_subn_verify_config(IN osm_subn_opt_t * p_opts) } #endif + if (p_opts->m_key_protect_bits > 3) { + log_report(" Invalid Cached Option Value:" + "m_key_protection_level = %u Setting to %u " + "instead\n", p_opts->m_key_protect_bits, 2); + p_opts->m_key_protect_bits = 2; + } + if (p_opts->root_guid_file != NULL) { FILE *root_file = fopen(p_opts->root_guid_file, "r"); if (!root_file) {