1
0
Fork 0
remarkable-linux/drivers/target
Himanshu Madhani b90311472f target: Fix target_release_cmd_kref shutdown comp leak
[ Upstream commit 5e47f1985d ]

This patch fixes an active I/O shutdown bug for fabric
drivers using target_wait_for_sess_cmds(), where se_cmd
descriptor shutdown would result in hung tasks waiting
indefinitely for se_cmd->cmd_wait_comp to complete().

To address this bug, drop the incorrect list_del_init()
usage in target_wait_for_sess_cmds() and always complete()
during se_cmd target_release_cmd_kref() put, in order to
let caller invoke the final fabric release callback
into se_cmd->se_tfo->release_cmd() code.

Reported-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Tested-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
Cc: stable@vger.kernel.org
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
2016-04-18 08:51:06 -04:00
..
iscsi iscsi-target: Fix rx_login_comp hang after login failure 2016-03-05 22:11:40 -05:00
loopback Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2015-04-24 10:22:09 -07:00
sbp target: simplify the target template registration API 2015-04-14 12:28:41 -07:00
tcm_fc Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2015-04-24 10:22:09 -07:00
Kconfig target: Put TCMU under a new config option 2015-04-19 22:41:12 -07:00
Makefile target: Put TCMU under a new config option 2015-04-19 22:41:12 -07:00
target_core_alua.c target: Use a PASSTHROUGH flag instead of transport_types 2015-05-30 19:58:11 -07:00
target_core_alua.h target_core_alua: Referrals configfs integration 2014-01-09 21:48:35 -08:00
target_core_configfs.c target: Use a PASSTHROUGH flag instead of transport_types 2015-05-30 19:58:11 -07:00
target_core_device.c target: Use a PASSTHROUGH flag instead of transport_types 2015-05-30 19:58:11 -07:00
target_core_fabric_configfs.c target: simplify the target template registration API 2015-04-14 12:28:41 -07:00
target_core_fabric_lib.c target: fix pr_out length in iscsi_parse_pr_out_transport_id 2014-09-17 15:17:35 -07:00
target_core_file.c target: Use a PASSTHROUGH flag instead of transport_types 2015-05-30 19:58:11 -07:00
target_core_file.h Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2014-01-31 15:31:23 -08:00
target_core_hba.c target: Move dev_cit to struct se_subsystem_api 2014-12-01 21:35:22 -08:00
target_core_iblock.c target: Use a PASSTHROUGH flag instead of transport_types 2015-05-30 19:58:11 -07:00
target_core_iblock.h target: kill struct se_subsystem_dev 2012-11-06 20:55:43 -08:00
target_core_internal.h target: Fix se_tpg_tfo->tf_subsys regression + remove tf_subsystem 2015-05-30 18:04:20 -07:00
target_core_pr.c target: Fix linux-4.1.y specific compile warning 2016-03-05 22:11:42 -05:00
target_core_pr.h target: Fix APTPL metadata handling for dynamic MappedLUNs 2014-10-04 05:40:19 +00:00
target_core_pscsi.c target: Use a PASSTHROUGH flag instead of transport_types 2015-05-30 19:58:11 -07:00
target_core_pscsi.h target/pscsi: Don't leak scsi_host if hba is VIRTUAL_HOST 2015-05-30 19:11:02 -07:00
target_core_rd.c target: Use a PASSTHROUGH flag instead of transport_types 2015-05-30 19:58:11 -07:00
target_core_rd.h target/rd: Add support for protection SGL setup + release 2014-01-19 02:22:05 +00:00
target_core_sbc.c target: fix COMPARE_AND_WRITE non zero SGL offset data corruption 2016-03-05 22:11:41 -05:00
target_core_spc.c Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2015-04-24 10:22:09 -07:00
target_core_stat.c target: Convert se_device statistics to atomic_long_t 2013-11-13 18:34:55 -08:00
target_core_tmr.c target: Drop incorrect ABORT_TASK put for completed commands 2016-03-22 11:10:28 -04:00
target_core_tpg.c target: simplify the target template registration API 2015-04-14 12:28:41 -07:00
target_core_transport.c target: Fix target_release_cmd_kref shutdown comp leak 2016-04-18 08:51:06 -04:00
target_core_ua.c target: Fix v4.1 UNIT_ATTENTION se_node_acl->device_list[] NULL pointer 2015-10-22 14:43:11 -07:00
target_core_ua.h target: target_core_ua_h: Add #define of include guard 2014-09-15 14:27:43 -07:00
target_core_user.c target: Use a PASSTHROUGH flag instead of transport_types 2015-05-30 19:58:11 -07:00
target_core_xcopy.c target: Attach EXTENDED_COPY local I/O descriptors to xcopy_pt_sess 2015-10-22 14:43:11 -07:00
target_core_xcopy.h target: Add support for EXTENDED_COPY copy offload emulation 2013-09-10 16:48:43 -07:00