Skip to content

Commit

Permalink
tcm_qla2xxx: Fix tcm_qla2xxx_do_rsp check condition cmd_kref leak
Browse files Browse the repository at this point in the history
This patch fixes a bug in tcm_qla2xxx_do_rsp() where the direct call to
transport_send_check_condition_and_sense() is leaking se_cmd->cmd_kref,
and causing hangs during session shutdown.

Change this to transport_generic_request_failure() so that target-core
makes the proper callbacks into TFO->check_stop_free() ->
tcm_qla2xxx_check_stop_free() -> target_put_sess_cmd()

Reported-by: Roland Dreier <roland@purestorage.com>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
  • Loading branch information
nablio3000 committed Feb 11, 2012
1 parent 056e3a1 commit aacdb7b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/scsi/qla2xxx/tcm_qla2xxx.c
Original file line number Diff line number Diff line change
Expand Up @@ -626,8 +626,7 @@ void tcm_qla2xxx_do_rsp(struct work_struct *work)
/*
* Dispatch ->queue_status from workqueue process context
*/
transport_send_check_condition_and_sense(&cmd->se_cmd,
cmd->se_cmd.scsi_sense_reason, 0);
transport_generic_request_failure(&cmd->se_cmd);
}

/*
Expand Down

0 comments on commit aacdb7b

Please sign in to comment.