]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
nvme-pci: add missing unlock for reset error
authorKeith Busch <keith.busch@intel.com>
Mon, 11 Feb 2019 16:23:50 +0000 (09:23 -0700)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Aug 2019 09:18:49 +0000 (11:18 +0200)
commitfaf6c938028fe163571ed33c405150c5b916a5e5
tree8e2997c713aff685cf3c9614483dc0703c0c6762
parenta235d980e51b99e0278b050e51c453773bc8d3d0
nvme-pci: add missing unlock for reset error

BugLink: https://bugs.launchpad.net/bugs/1837813
[ Upstream commit 4726bcf30fad37cc555cd9dcd6c73f2b2668c879 ]

The reset work holds a mutex to prevent races with removal modifying the
same resources, but was unlocking only on success. Unlock on failure
too.

Fixes: 5c959d73dba64 ("nvme-pci: fix rapid add remove sequence")
Signed-off-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/nvme/host/pci.c