Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753441AbcJCRav convert rfc822-to-8bit (ORCPT ); Mon, 3 Oct 2016 13:30:51 -0400 Received: from mga14.intel.com ([192.55.52.115]:28271 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752738AbcJCRah (ORCPT ); Mon, 3 Oct 2016 13:30:37 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,438,1473145200"; d="scan'208";a="1039766649" From: "Winkler, Tomas" To: Jason Gunthorpe , Jarkko Sakkinen CC: "tpmdd-devel@lists.sourceforge.net" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH] tpm: don't destroy chip device prematurely Thread-Topic: [PATCH] tpm: don't destroy chip device prematurely Thread-Index: AQHSHJY7jYiWgZcWb0y7/x76d69Sl6CUwviAgAC3bgCAANJWAIAAChaQgAAk5oCAADgUAIAARufw Date: Mon, 3 Oct 2016 17:30:31 +0000 Message-ID: <5B8DA87D05A7694D9FA63FD143655C1B542F4775@hasmsx108.ger.corp.intel.com> References: <1475393971-12715-1-git-send-email-tomas.winkler@intel.com> <20161002101755.GA25844@intel.com> <20161002102455.GA27464@intel.com> <20161002212126.GA25872@obsidianresearch.com> <5B8DA87D05A7694D9FA63FD143655C1B542F466B@hasmsx108.ger.corp.intel.com> <5B8DA87D05A7694D9FA63FD143655C1B542F46C1@hasmsx108.ger.corp.intel.com> <20161003124225.GD9990@intel.com> <20161003160308.GA6801@obsidianresearch.com> In-Reply-To: <20161003160308.GA6801@obsidianresearch.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_IC x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZTQ5MmVmNzgtMzkxZS00N2NkLTk1NTItMDljYmM4OWRlMTJiIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6InRkTWVpQTJZRDRJakx1YTFKRHVPNnNCdHhvNzBFMjBJKzBaZGZOaVpYTmM9In0= x-originating-ip: [10.184.70.10] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 742 Lines: 27 > > On Mon, Oct 03, 2016 at 03:42:25PM +0300, Jarkko Sakkinen wrote: > > > > I've looked to the registration code and it indeed has few more > > > issues > > ? > > > > Maybe TPM_CHIP_FLAG_REGISTERED can be used for sealing the access to > > > the device during deregistration, current usage is void. > > This is done via chip->ops = NULL and the rwlock scheme. I'm not this is the best choice, kind of unusual in the subsystems. > > > Good catch BTW. This flag has gone quite obsolote. > > I think all the drivers have been updated at this point so we can probably get > rid of it entirely. I would actually keep it for the tpm2_shutdown exception, not sure this can be handled by ops = NULL and rwlock. Thanks Tomas > > Jason