From: Nicholas Bellinger <nab@xxxxxxxxxxxxxxx> This patch fixes a bug in target_submit_cmd() where the direct call to transport_send_check_condition_and_sense() was not calling the final target_put_sess_cmd() release callback. Use proper transport_generic_request_failure() wrapper instead around transport_send_check_condition_and_sense() to handle kref_put() along with potential internal queue full response processing. Reported-by: Roland Dreier <roland@xxxxxxxxxxxxxxx> Cc: Roland Dreier <roland@xxxxxxxxxxxxxxx> Signed-off-by: Nicholas Bellinger <nab@xxxxxxxxxxxxxxx> --- drivers/target/target_core_transport.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c index fa5a6cf..72824f1 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c @@ -1687,8 +1687,7 @@ void target_submit_cmd(struct se_cmd *se_cmd, struct se_session *se_sess, return; out_check_cond: - transport_send_check_condition_and_sense(se_cmd, - se_cmd->scsi_sense_reason, 0); + transport_generic_request_failure(se_cmd); } EXPORT_SYMBOL(target_submit_cmd); -- 1.7.2.5 -- To unsubscribe from this list: send the line "unsubscribe target-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html