linux/drivers/nvme/target
Chaitanya Kulkarni 1401fcc4e3 nvme-loop: don't put ctrl on nvme_init_ctrl error
The function nvme_init_ctrl() gets the ctrl reference & when it fails it
does put the ctrl reference in the error unwind code.

When creating loop ctrl in nvme_loop_create_ctrl() if nvme_init_ctrl()
returns non zero (i.e. error) value it jumps to the "out_put_ctrl" label
which calls nvme_put_ctrl(), that will lead to douple ctrl put in error
unwind path.

Update nvme_loop_create_ctrl() such that this patch removes the
"out_put_ctrl" label, add a new "out" label after nvme_put_ctrl() in
error unwind path and jump to newly added label when nvme_init_ctrl()
call retuns an error.

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
2020-10-07 07:56:16 +02:00
..
admin-cmd.c nvmet: handle keep-alive timer when kato is modified by a set features cmd 2020-09-27 09:14:19 +02:00
configfs.c nvmet: fix a memory leak 2020-08-21 17:14:27 -06:00
core.c nvmet: handle keep-alive timer when kato is modified by a set features cmd 2020-09-27 09:14:19 +02:00
discovery.c nvmet: introduce flags member in nvmet_fabrics_ops 2020-07-08 16:16:17 +02:00
fabrics-cmd.c nvmet: add metadata/T10-PI support 2020-05-27 07:12:40 +02:00
fc.c nvmet-fc: fix missing check for no hostport struct 2020-09-27 09:14:19 +02:00
fcloop.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
io-cmd-bdev.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
io-cmd-file.c nvmet: rename nvmet_check_data_len to nvmet_check_transfer_len 2020-05-27 07:12:39 +02:00
Kconfig nvmet: introduce the passthru Kconfig option 2020-07-29 07:45:21 +02:00
loop.c nvme-loop: don't put ctrl on nvme_init_ctrl error 2020-10-07 07:56:16 +02:00
Makefile nvmet: add passthru code to process commands 2020-07-29 07:45:21 +02:00
nvmet.h nvmet: handle keep-alive timer when kato is modified by a set features cmd 2020-09-27 09:14:19 +02:00
passthru.c nvmet: add passthru ZNS support 2020-09-27 09:14:19 +02:00
rdma.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
tcp.c nvmet-tcp: have queue io_work context run on sock incoming cpu 2020-09-27 09:14:18 +02:00
trace.c nvmet: trace: parse Get LBA Status command in detail 2019-08-29 12:55:01 -07:00
trace.h nvmet: add async event tracing support 2020-05-27 07:12:38 +02:00