From patchwork Wed Jun 16 17:21:25 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arlin Davis X-Patchwork-Id: 106530 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o5GHLOpa025448 for ; Wed, 16 Jun 2010 17:21:27 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756256Ab0FPRV1 (ORCPT ); Wed, 16 Jun 2010 13:21:27 -0400 Received: from mga09.intel.com ([134.134.136.24]:41082 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756156Ab0FPRV0 convert rfc822-to-8bit (ORCPT ); Wed, 16 Jun 2010 13:21:26 -0400 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP; 16 Jun 2010 10:21:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.53,427,1272870000"; d="scan'208";a="630958119" Received: from orsmsx602.amr.corp.intel.com ([10.22.226.211]) by orsmga001.jf.intel.com with ESMTP; 16 Jun 2010 10:21:26 -0700 Received: from orsmsx506.amr.corp.intel.com ([10.22.226.44]) by orsmsx602.amr.corp.intel.com ([10.22.226.211]) with mapi; Wed, 16 Jun 2010 10:21:26 -0700 From: "Davis, Arlin R" To: "linux-rdma@vger.kernel.org" , ofw_list Date: Wed, 16 Jun 2010 10:21:25 -0700 Subject: [PATCH 2/5] dapl-2.0 - ucm: incorrectly freeing port on passive side after reject Thread-Topic: [PATCH 2/5] dapl-2.0 - ucm: incorrectly freeing port on passive side after reject Thread-Index: AcsNeFk3acLgWTKNR9CXxjMprtSo8A== Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Wed, 16 Jun 2010 17:21:28 +0000 (UTC) diff --git a/dapl/openib_ucm/cm.c b/dapl/openib_ucm/cm.c index 806602f..b874c8b 100644 --- a/dapl/openib_ucm/cm.c +++ b/dapl/openib_ucm/cm.c @@ -657,10 +657,6 @@ void dapls_cm_release(dp_ib_cm_handle_t cm) if (!cm->sp && cm->msg.sport) ucm_free_port(&cm->hca->ib_trans, ntohs(cm->msg.sport)); - /* server, release local conn id port */ - if (cm->sp && cm->msg.dport) - ucm_free_port(&cm->hca->ib_trans, ntohs(cm->msg.dport)); - /* clean up any UD address handles */ if (cm->ah) { ibv_destroy_ah(cm->ah); @@ -1753,6 +1749,7 @@ dapls_ib_remove_conn_listener(IN DAPL_IA *ia, IN DAPL_SP *sp) sp->cm_srvc_handle = NULL; dapli_dequeue_listen(cm); + ucm_free_port(&cm->hca->ib_trans, ntohs(cm->msg.sport)); dapls_cm_release(cm); /* last ref, dealloc */ } return DAT_SUCCESS;