From patchwork Wed Feb 20 19:02:40 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hal Rosenstock X-Patchwork-Id: 2168811 X-Patchwork-Delegate: hal@mellanox.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 40EE93FD4E for ; Wed, 20 Feb 2013 19:02:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934126Ab3BTTCn (ORCPT ); Wed, 20 Feb 2013 14:02:43 -0500 Received: from mail-ie0-f180.google.com ([209.85.223.180]:57739 "EHLO mail-ie0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933973Ab3BTTCn (ORCPT ); Wed, 20 Feb 2013 14:02:43 -0500 Received: by mail-ie0-f180.google.com with SMTP id bn7so10520265ieb.11 for ; Wed, 20 Feb 2013 11:02:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding:x-gm-message-state; bh=PwbauVNsYM9CKUs3r7zlGUMQMcHdhHwgzf/RB9obsvE=; b=pQYujY5G4WzRfrQt4ZXBlECeAokMuo9R66VuMDR9FBDYrys04CaYXf5xMB/XC+8usN ej+wsMrJIE0pkUXXExjXYeJdww+ZrK7Mp+6bI2Ih+IT3OE3ZgWEMwmGoHCR+pz1LFEwF z9h2y0TsA5jp98BRBPCy2M0bKFZ7thvapgbzYVMzvNRUcODf5YGhnVZFmBsghW6kgk03 SO4JbCmE9qk965f4yYmNnqu2pX+Jz35KG9fSZH4AJLHKyG1utEqtMaXQ4pqbqHNXIdK5 oTlcd+dtjK3sUJPhGalczX1/oz8DLUKDu9Cuq9UZ5mouU1jDg7OpTxDkMgLXapD8UZpK K2DQ== X-Received: by 10.50.192.169 with SMTP id hh9mr7405057igc.31.1361386962552; Wed, 20 Feb 2013 11:02:42 -0800 (PST) Received: from [192.168.1.102] (c-71-234-225-85.hsd1.ct.comcast.net. [71.234.225.85]) by mx.google.com with ESMTPS id fa6sm16664140igb.2.2013.02.20.11.02.41 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 20 Feb 2013 11:02:41 -0800 (PST) Message-ID: <51251DD0.3050506@dev.mellanox.co.il> Date: Wed, 20 Feb 2013 14:02:40 -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)" Subject: [PATCH] opensm/osm_sa_path_record.c: Make sure either none or both ServiceID parameters are supplied X-Gm-Message-State: ALoCoQnnTynKQDG+IkXr9+mKR4G/xFfrt+6J3e/WVMBHsKD27f1sFVXJWQ4aiSCcZ9E+MlxRPTfv Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Signed-off-by: Hal Rosenstock --- -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/opensm/osm_sa_path_record.c b/opensm/osm_sa_path_record.c index 17569cb..8978883 100644 --- a/opensm/osm_sa_path_record.c +++ b/opensm/osm_sa_path_record.c @@ -1764,6 +1761,14 @@ void osm_pr_rcv_process(IN void *context, IN void *data) } } + /* Make sure either none or both ServiceID parameters are supplied */ + if ((p_sa_mad->comp_mask & IB_PR_COMPMASK_SERVICEID) != 0 && + (p_sa_mad->comp_mask & IB_PR_COMPMASK_SERVICEID) != + IB_PR_COMPMASK_SERVICEID) { + osm_sa_send_error(sa, p_madw, IB_SA_MAD_STATUS_INSUF_COMPS); + goto Exit; + } + cl_qlist_init(&pr_list); /*