kernel-fxtec-pro1x/drivers/nvme/host
Chaitanya Kulkarni b6df5afc3d nvme-core: put ctrl ref when module ref get fail
commit 4bab69093044ca81f394bd0780be1b71c5a4d308 upstream.

When try_module_get() fails in the nvme_dev_open() it returns without
releasing the ctrl reference which was taken earlier.

Put the ctrl reference which is taken before calling the
try_module_get() in the error return code path.

Fixes: 52a3974feb1a "nvme-core: get/put ctrl and transport module in nvme_dev_open/release()"
Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-10-14 10:31:22 +02:00
..
core.c nvme-core: put ctrl ref when module ref get fail 2020-10-14 10:31:22 +02:00
fabrics.c nvme-fabrics: don't check state NVME_CTRL_NEW for request acceptance 2020-09-17 13:45:25 +02:00
fabrics.h nvme: if_ready checks to fail io to deleting controller 2018-07-24 13:44:40 +02:00
fault_inject.c nvme: Add fault injection feature 2018-03-26 08:53:43 -06:00
fc.c nvme-fc: fail new connections to a deleted host or remote port 2020-10-07 08:00:07 +02:00
Kconfig IB: Revert "remove redundant INFINIBAND kconfig dependencies" 2018-05-28 10:40:16 -06:00
lightnvm.c lightnvm: do no update csecs and sos on 1.2 2019-11-24 08:20:51 +01:00
Makefile nvme: Add fault injection feature 2018-03-26 08:53:43 -06:00
multipath.c nvme-multipath: do not reset on unknown status 2020-10-01 13:14:40 +02:00
nvme.h nvme: explicitly update mpath disk capacity on revalidation 2020-10-01 13:14:49 +02:00
pci.c nvme: retain split access workaround for capability reads 2020-01-27 14:51:16 +01:00
rdma.c nvme-rdma: cancel async events before freeing event struct 2020-09-23 12:10:58 +02:00
trace.c nvme: add disk name to trace events 2018-07-24 15:55:48 +02:00
trace.h nvme: add disk name to trace events 2018-07-24 15:55:48 +02:00