summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorNicholas Bellinger <nab@linux-iscsi.org>2016-01-11 21:53:05 -0800
committerNicholas Bellinger <nab@linux-iscsi.org>2016-02-03 14:09:47 -0800
commita6d9bb1c9605cd4f44e2d8290dc4d0e88f20292d (patch)
tree451fc518e71e8c51e983785c90d690b98a6cd098 /include
parentfebe562c20dfa8f33bee7d419c6b517986a5aa33 (diff)
downloadlinux-stable-a6d9bb1c9605cd4f44e2d8290dc4d0e88f20292d.tar.gz
linux-stable-a6d9bb1c9605cd4f44e2d8290dc4d0e88f20292d.tar.bz2
linux-stable-a6d9bb1c9605cd4f44e2d8290dc4d0e88f20292d.zip
target: Fix LUN_RESET active TMR descriptor handling
This patch fixes a NULL pointer se_cmd->cmd_kref < 0 refcount bug during TMR LUN_RESET with active TMRs, triggered during se_cmd + se_tmr_req descriptor shutdown + release via core_tmr_drain_tmr_list(). To address this bug, go ahead and obtain a local kref_get_unless_zero(&se_cmd->cmd_kref) for active I/O to set CMD_T_ABORTED, and transport_wait_for_tasks() followed by the final target_put_sess_cmd() to drop the local ->cmd_kref. Also add two new checks within target_tmr_work() to avoid CMD_T_ABORTED -> TFO->queue_tm_rsp() callbacks ahead of invoking the backend -> fabric put in transport_cmd_check_stop_to_fabric(). For good measure, also change core_tmr_release_req() to use list_del_init() ahead of se_tmr_req memory free. Reviewed-by: Quinn Tran <quinn.tran@qlogic.com> Cc: Himanshu Madhani <himanshu.madhani@qlogic.com> Cc: Sagi Grimberg <sagig@mellanox.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Hannes Reinecke <hare@suse.de> Cc: Andy Grover <agrover@redhat.com> Cc: Mike Christie <mchristi@redhat.com> Cc: stable@vger.kernel.org # 3.10+ Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions