From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jason Gunthorpe Subject: Re: [PATCH v3 04/11] tpm: Provide strong locking for device removal Date: Tue, 23 Feb 2016 12:52:46 -0700 Message-ID: <20160223195246.GC389@obsidianresearch.com> References: <1455885728-10315-1-git-send-email-stefanb@linux.vnet.ibm.com> <1455885728-10315-5-git-send-email-stefanb@linux.vnet.ibm.com> <20160222210844.GA3310@intel.com> <20160222222017.GC27228@obsidianresearch.com> <20160223194014.GA5241@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20160223194014.GA5241-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: tpmdd-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: Jarkko Sakkinen Cc: tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: tpmdd-devel@lists.sourceforge.net On Tue, Feb 23, 2016 at 09:40:14PM +0200, Jarkko Sakkinen wrote: > > echo 1 > /sys/.../remove > > > > Is basically the same as a module unload without requiring module > > unload. module locking cannot be relied upon for correctness like this > > ever since hot remove was added to the kernel. > > The 'remove' file applies only to PCI devices AFAIK. Not only, PCI has remove but many other bus types do too, eg i2c, spi, openfirmware, etc can all be hot-removed in various ways. As a general subsystem core tpm cannot assume it's drivers are only using non-hotplugable devices. Jason ------------------------------------------------------------------------------ Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140