mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
Merge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending
Pull SCSI target fixes from Nicholas Bellinger:
"The highlights include:
- Fix iscsi-target payload memory leak during
ISCSI_FLAG_TEXT_CONTINUE (Varun Prakash)
- Fix tcm_qla2xxx incorrect use of tcm_qla2xxx_free_cmd during ABORT
(Pascal de Bruijn + Himanshu Madhani + nab)
- Fix iscsi-target long-standing issue with parallel delete of a
single network portal across multiple target instances (Gary Guo +
nab)
- Fix target dynamic se_node GPF during uncached shutdown regression
(Justin Maggard + nab)"
* git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
target: Fix node_acl demo-mode + uncached dynamic shutdown regression
iscsi-target: Fix iscsi_np reset hung task during parallel delete
qla2xxx: Fix incorrect tcm_qla2xxx_free_cmd use during TMR ABORT (v2)
cxgbit: fix sg_nents calculation
iscsi-target: fix invalid flags in text response
iscsi-target: fix memory leak in iscsit_setup_text_cmd()
cxgbit: add missing __kfree_skb()
tcmu: free old string on reconfig
tcmu: Fix possible to/from address overflow when doing the memcpy
This commit is contained in:
commit
a99bcdce83
9 changed files with 40 additions and 53 deletions
|
|
@ -500,7 +500,6 @@ static int tcm_qla2xxx_handle_cmd(scsi_qla_host_t *vha, struct qla_tgt_cmd *cmd,
|
|||
static void tcm_qla2xxx_handle_data_work(struct work_struct *work)
|
||||
{
|
||||
struct qla_tgt_cmd *cmd = container_of(work, struct qla_tgt_cmd, work);
|
||||
unsigned long flags;
|
||||
|
||||
/*
|
||||
* Ensure that the complete FCP WRITE payload has been received.
|
||||
|
|
@ -508,17 +507,6 @@ static void tcm_qla2xxx_handle_data_work(struct work_struct *work)
|
|||
*/
|
||||
cmd->cmd_in_wq = 0;
|
||||
|
||||
spin_lock_irqsave(&cmd->cmd_lock, flags);
|
||||
cmd->data_work = 1;
|
||||
if (cmd->aborted) {
|
||||
cmd->data_work_free = 1;
|
||||
spin_unlock_irqrestore(&cmd->cmd_lock, flags);
|
||||
|
||||
tcm_qla2xxx_free_cmd(cmd);
|
||||
return;
|
||||
}
|
||||
spin_unlock_irqrestore(&cmd->cmd_lock, flags);
|
||||
|
||||
cmd->qpair->tgt_counters.qla_core_ret_ctio++;
|
||||
if (!cmd->write_data_transferred) {
|
||||
/*
|
||||
|
|
@ -765,31 +753,13 @@ static void tcm_qla2xxx_queue_tm_rsp(struct se_cmd *se_cmd)
|
|||
qlt_xmit_tm_rsp(mcmd);
|
||||
}
|
||||
|
||||
#define DATA_WORK_NOT_FREE(_cmd) (_cmd->data_work && !_cmd->data_work_free)
|
||||
static void tcm_qla2xxx_aborted_task(struct se_cmd *se_cmd)
|
||||
{
|
||||
struct qla_tgt_cmd *cmd = container_of(se_cmd,
|
||||
struct qla_tgt_cmd, se_cmd);
|
||||
unsigned long flags;
|
||||
|
||||
if (qlt_abort_cmd(cmd))
|
||||
return;
|
||||
|
||||
spin_lock_irqsave(&cmd->cmd_lock, flags);
|
||||
if ((cmd->state == QLA_TGT_STATE_NEW)||
|
||||
((cmd->state == QLA_TGT_STATE_DATA_IN) &&
|
||||
DATA_WORK_NOT_FREE(cmd))) {
|
||||
cmd->data_work_free = 1;
|
||||
spin_unlock_irqrestore(&cmd->cmd_lock, flags);
|
||||
/*
|
||||
* cmd has not reached fw, Use this trigger to free it.
|
||||
*/
|
||||
tcm_qla2xxx_free_cmd(cmd);
|
||||
return;
|
||||
}
|
||||
spin_unlock_irqrestore(&cmd->cmd_lock, flags);
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
static void tcm_qla2xxx_clear_sess_lookup(struct tcm_qla2xxx_lport *,
|
||||
|
|
|
|||
Loading…
Reference in a new issue