From patchwork Wed Feb 20 19:02:46 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hal Rosenstock X-Patchwork-Id: 2168821 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 555423FD4E for ; Wed, 20 Feb 2013 19:02:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934027Ab3BTTCt (ORCPT ); Wed, 20 Feb 2013 14:02:49 -0500 Received: from mail-ie0-f181.google.com ([209.85.223.181]:45802 "EHLO mail-ie0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933973Ab3BTTCt (ORCPT ); Wed, 20 Feb 2013 14:02:49 -0500 Received: by mail-ie0-f181.google.com with SMTP id 17so10118965iea.40 for ; Wed, 20 Feb 2013 11:02:49 -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=C72RVd4/c4BaVn5BjP61HqheTmkNA+1+UxmIhNX+OFw=; b=b7y2WvzTy+Ly67dFET2xVusY7pIpBC3lVgDKIqAN3D3pCd+crHJ37IST7nJARatZYD StMvwjU63XnPVbS8QtaepBNZvvB8nkdbScnGrCiag5Eo8MZmtbMsyNMnZvFxCV31dg4X 28isojhPmipX92obUer2IEq0WZRJyqjsscEmKbm+jCjMXTjogi+Ane/AXjcIBZS6hlez JitkBcB0502AadvWlPJytI8gjeE+AQqLaUyXrK5wD9C12NCk40m/xgyXZbVi6tqL3UgC zG7nvw6H2RxNSRwpWkFMCUX0QBW+kUYyglnvNVsuVl55r2PXcmrdi9JLLcKLhtpWjfy+ 9cdg== X-Received: by 10.50.214.10 with SMTP id nw10mr11389632igc.15.1361386968996; Wed, 20 Feb 2013 11:02:48 -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 xe9sm304400igb.7.2013.02.20.11.02.47 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 20 Feb 2013 11:02:47 -0800 (PST) Message-ID: <51251DD6.4000009@dev.mellanox.co.il> Date: Wed, 20 Feb 2013 14:02:46 -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_multipath_record.c: Make sure either none or both ServiceID parameters are supplied X-Gm-Message-State: ALoCoQlUJ+mIFyesj1k+EPi18YLmRToq5dEjsDCdgcjdq7Q7g45C3s9tpSAfFT+iExjAByDmNM3T 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_multipath_record.c b/opensm/osm_sa_multipath_record.c index e89c93a..7083b04 100644 --- a/opensm/osm_sa_multipath_record.c +++ b/opensm/osm_sa_multipath_record.c @@ -1587,6 +1622,14 @@ void osm_mpr_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_MPR_COMPMASK_SERVICEID) != 0 && + (p_sa_mad->comp_mask & IB_MPR_COMPMASK_SERVICEID) != + IB_MPR_COMPMASK_SERVICEID) { + osm_sa_send_error(sa, p_madw, IB_SA_MAD_STATUS_INSUF_COMPS); + goto Exit; + } + cl_qlist_init(&pr_list); /*