From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jarkko Sakkinen Subject: Re: [PATCH 03/23] TPM: Provide a platform driver for the user emulator driver Date: Fri, 24 Aug 2018 09:30:15 +0300 Message-ID: <20180824063015.GE3584@linux.intel.com> References: <153486700916.13066.12870860668352070081.stgit@warthog.procyon.org.uk> <153486702979.13066.16900998092976336647.stgit@warthog.procyon.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <153486702979.13066.16900998092976336647.stgit-S6HVgzuS8uM4Awkfq6JHfwNdhmdF6hFW@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: tpmdd-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: David Howells Cc: linux-security-module-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, keyrings-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-integrity-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, denkenz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org List-Id: tpmdd-devel@lists.sourceforge.net On Tue, Aug 21, 2018 at 04:57:09PM +0100, David Howells wrote: > Provide a platform driver for the user emulator driver. This seems to be > necessary to stop tpm_chip_find_get() from blowing up because it assumes > unconditionally that any device will have a driver attached: > > if (try_module_get(pos->dev->driver->owner)) { > > However, this doesn't then work right because if I remove the TPM device and > re-add it, the tpm ID isn't recycled (ie, /dev/tpm0 becomes unavailable and > the new TPM is /dev/tpm1). > > Signed-off-by: David Howells Again, a duplicate. /Jarkko ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot