[PATCH 1/2] NVMe: Lock out shutdown during pci init

Christoph Hellwig hch at infradead.org
Tue Feb 16 23:59:13 PST 2016


On Tue, Feb 16, 2016 at 06:40:47PM +0000, Keith Busch wrote:
> On Sat, Feb 13, 2016 at 01:58:51AM -0800, Christoph Hellwig wrote:
> > Seems like we should be holding the lock over the call
> > to nvme_dev_disable to get protection for the whole execution,
> > e.g. by adding a __nvme_dev_disable variant that expects the lock
> > to be held.
> > 
> > Maybe it's also worth renaming shutdown_lock to register_mutex
> > or similar to better document what it protects.
> 
> Perhaps we shouldn't unmap the registers on a reset. That'd fix several
> problems, including this one and writing queue doorbells.

I always thought there was a deep reason we'd need to unmap it.  But
if there isn't getting rid of the unmap should make the driver a lot
more robust.



More information about the Linux-nvme mailing list