Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752422AbcJCQDT (ORCPT ); Mon, 3 Oct 2016 12:03:19 -0400 Received: from quartz.orcorp.ca ([184.70.90.242]:36638 "EHLO quartz.orcorp.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750989AbcJCQDL (ORCPT ); Mon, 3 Oct 2016 12:03:11 -0400 Date: Mon, 3 Oct 2016 10:03:08 -0600 From: Jason Gunthorpe To: Jarkko Sakkinen Cc: "Winkler, Tomas" , "tpmdd-devel@lists.sourceforge.net" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] tpm: don't destroy chip device prematurely Message-ID: <20161003160308.GA6801@obsidianresearch.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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161003124225.GD9990@intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-Broken-Reverse-DNS: no host name found for IP address 10.0.0.151 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 499 Lines: 17 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. > 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. Jason