From patchwork Fri Oct 16 23:50:33 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arlin Davis X-Patchwork-Id: 54469 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n9GNmoEW025082 for ; Fri, 16 Oct 2009 23:50:35 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751379AbZJPXua (ORCPT ); Fri, 16 Oct 2009 19:50:30 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751478AbZJPXua (ORCPT ); Fri, 16 Oct 2009 19:50:30 -0400 Received: from mga11.intel.com ([192.55.52.93]:14492 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751379AbZJPXu3 convert rfc822-to-8bit (ORCPT ); Fri, 16 Oct 2009 19:50:29 -0400 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 16 Oct 2009 16:37:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.44,576,1249282800"; d="scan'208";a="504131844" Received: from orsmsx603.amr.corp.intel.com ([10.22.226.49]) by fmsmga002.fm.intel.com with ESMTP; 16 Oct 2009 16:42:13 -0700 Received: from orsmsx506.amr.corp.intel.com ([10.22.226.44]) by orsmsx603.amr.corp.intel.com ([10.22.226.49]) with mapi; Fri, 16 Oct 2009 16:50:34 -0700 From: "Davis, Arlin R" To: linux-rdma , "ofw@lists.openfabrics.org" CC: "Smith, Stan" , "Hefty, Sean" Date: Fri, 16 Oct 2009 16:50:33 -0700 Subject: [PATCH 06/11] The HCA should not be closed until all resources have been released. Thread-Topic: [PATCH 06/11] The HCA should not be closed until all resources have been released. Thread-Index: AcpOu3Mc86yEi/L3QpS6q37sjiRPWw== 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 diff --git a/dapl/openib_ucm/device.c b/dapl/openib_ucm/device.c index 90a044e..4f26e87 100644 --- a/dapl/openib_ucm/device.c +++ b/dapl/openib_ucm/device.c @@ -354,16 +354,17 @@ DAT_RETURN dapls_ib_close_hca(IN DAPL_HCA * hca_ptr) } } + dapl_os_lock_destroy(&hca_ptr->ib_trans.lock); + dapl_os_lock_destroy(&hca_ptr->ib_trans.llock); + destroy_cr_pipe(hca_ptr); /* no longer need pipe */ + ucm_service_destroy(hca_ptr); + if (hca_ptr->ib_hca_handle != IB_INVALID_HANDLE) { if (ibv_close_device(hca_ptr->ib_hca_handle)) return (dapl_convert_errno(errno, "ib_close_device")); hca_ptr->ib_hca_handle = IB_INVALID_HANDLE; } - dapl_os_lock_destroy(&hca_ptr->ib_trans.lock); - dapl_os_lock_destroy(&hca_ptr->ib_trans.llock); - destroy_cr_pipe(hca_ptr); /* no longer need pipe */ - ucm_service_destroy(hca_ptr); return (DAT_SUCCESS); }