From: Nicholas Bellinger Date: Fri, 23 May 2014 07:48:35 +0000 (-0700) Subject: iser-target: Add missing target_put_sess_cmd for ImmedateData failure X-Git-Tag: omap-for-v3.16/fixes-against-rc1~95^2~4 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6cc44a6fb46e1ecc1c28125aa8fa34d317aa9ea7;p=pandora-kernel.git iser-target: Add missing target_put_sess_cmd for ImmedateData failure This patch addresses a bug where an early exception for SCSI WRITE with ImmediateData=Yes was missing the target_put_sess_cmd() call to drop the extra se_cmd->cmd_kref reference obtained during the normal iscsit_setup_scsi_cmd() codepath execution. This bug was manifesting itself during session shutdown within isert_cq_rx_comp_err() where target_wait_for_sess_cmds() would end up waiting indefinately for the last se_cmd->cmd_kref put to occur for the failed SCSI WRITE + ImmediateData descriptors. This fix follows what traditional iscsi-target code already does for the same failure case within iscsit_get_immediate_data(). Reported-by: Sagi Grimberg Cc: Sagi Grimberg Cc: Or Gerlitz Cc: stable@vger.kernel.org # 3.10+ Signed-off-by: Nicholas Bellinger --- Reading git-diff-tree failed