From patchwork Mon Mar 24 13:37:18 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hal Rosenstock X-Patchwork-Id: 3882751 X-Patchwork-Delegate: hal@mellanox.com Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 03EC1BF540 for ; Mon, 24 Mar 2014 13:37:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2CC8520256 for ; Mon, 24 Mar 2014 13:37:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D06252022F for ; Mon, 24 Mar 2014 13:37:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753195AbaCXNh2 (ORCPT ); Mon, 24 Mar 2014 09:37:28 -0400 Received: from mail-lb0-f174.google.com ([209.85.217.174]:36712 "EHLO mail-lb0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753181AbaCXNhZ (ORCPT ); Mon, 24 Mar 2014 09:37:25 -0400 Received: by mail-lb0-f174.google.com with SMTP id u14so3614060lbd.19 for ; Mon, 24 Mar 2014 06:37:24 -0700 (PDT) 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:content-transfer-encoding; bh=NExK3CYR+RCaLKi8C/yU1RefdcAnH7X6pYy4MmpF/m0=; b=kGmeug5hvXu6jQ5gqBF1eoBSSfCvLwL+jdfbLFkIZjNf0eF5wY+Rs4+Hl63xw5X5XW EEdDOsgjpBqCSIJMJ23UjYbXL3UX+Pbrny0ne/1oI0LzxsMAQdqkwpbHQQqEHXR6Wsk/ +CS0f6hUXIvUMkngLFf0dao776faJ4yeJK9dGMgQ5lIBK+BzqMZ7mmOFwxBI6iH/I4bS 9dxguP8o/WHAge/QQfuJZxPyZLVGscy+RBZSvjfFdM7N5yhzp6tz4Ky2zyaIn64Gf7qu zyb71dorBMUqVrK6Qb3fKwu4EGv05Iz5s8gN+A2N4x2PpuaQ2/2Dtw2qjkm+aPQdixlz Bq7w== X-Gm-Message-State: ALoCoQkwglWWiYeMoFs3dIWYDb/B+7eC5VxKqhGsD19iDyBgnqNKpgFQEX9oL18rnatT6tY0tfMC X-Received: by 10.112.202.3 with SMTP id ke3mr77402lbc.68.1395668243910; Mon, 24 Mar 2014 06:37:23 -0700 (PDT) Received: from [192.168.1.102] (c-98-229-118-119.hsd1.ma.comcast.net. [98.229.118.119]) by mx.google.com with ESMTPSA id rd5sm9572310lbb.0.2014.03.24.06.37.20 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 24 Mar 2014 06:37:22 -0700 (PDT) Message-ID: <5330350E.3040203@dev.mellanox.co.il> Date: Mon, 24 Mar 2014 09:37:18 -0400 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)" CC: Daniel Klein Subject: [PATCH opensm] osm_sa_mcmember_record.c: Fix removing members from existing mc group due to invalid requests Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, 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: Daniel Klein Date: Thu, 20 Mar 2014 10:26:51 +0200 Bug description: If there is an existing well known group with only non-full members, and opensm receives an invalid join request. opensm removes all the member of the groups. Signed-off-by: Daniel Klein Signed-off-by: Hal Rosenstock --- opensm/osm_sa_mcmember_record.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) -- 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_mcmember_record.c b/opensm/osm_sa_mcmember_record.c index 96bddb7..85e7681 100644 --- a/opensm/osm_sa_mcmember_record.c +++ b/opensm/osm_sa_mcmember_record.c @@ -1177,7 +1177,8 @@ static void mcmr_rcv_join_mgrp(IN osm_sa_t * sa, IN osm_madw_t * p_madw) || !(join_state != 0)) { char gid_str[INET6_ADDRSTRLEN]; /* since we might have created the new group we need to cleanup */ - osm_mgrp_cleanup(sa->p_subn, p_mgrp); + if (is_new_group) + osm_mgrp_cleanup(sa->p_subn, p_mgrp); CL_PLOCK_RELEASE(sa->p_lock); OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1B12: " "validate_more_comp_fields, validate_port_caps, " @@ -1214,7 +1215,8 @@ static void mcmr_rcv_join_mgrp(IN osm_sa_t * sa, IN osm_madw_t * p_madw) &mcmember_rec, proxy); if (!p_mcmr_port) { /* we fail to add the port so we might need to delete the group */ - osm_mgrp_cleanup(sa->p_subn, p_mgrp); + if (is_new_group) + osm_mgrp_cleanup(sa->p_subn, p_mgrp); CL_PLOCK_RELEASE(sa->p_lock); OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 1B06: " "osm_mgrp_add_port failed\n");