nvme: protect against simultaneous shutdown invocations
authorKeith Busch <keith.busch@intel.com>
Thu, 26 Nov 2015 11:21:29 +0000 (12:21 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Oct 2017 09:27:35 +0000 (11:27 +0200)
commit6d1400b09f99cfee275f9f0fd5e58d4fb1a1f1f0
tree998ae13c66f67a517204dc3e69a31628ea54f9b9
parent33d1fa43aad4ca11f5d01ede363c1dbdd2010540
nvme: protect against simultaneous shutdown invocations

commit 77bf25ea70200cddf083f74b7f617e5f07fac8bd upstream.

[Back-ported to 4.4. The difference is the file location of the struct
definition that's adding the mutex.

This fixes reported kernel panics in 4.4-stable from simultaneous
controller resets that was never supposed to be allowed to happen.]

Signed-off-by: Keith Busch <keith.busch@intel.com>
[hch: split from a larger patch]
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@fb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/nvme/host/nvme.h
drivers/nvme/host/pci.c