Patch "scsi: qla2xxx: Fix extraneous ref on sp's after adapter break" has been added to the 4.9-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
scsi: qla2xxx: Fix extraneous ref on sp's after adapter break
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
scsi-qla2xxx-fix-extraneous-ref-on-sp-s-after-adapter-break.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
4cd3b6ebff8510b2139d64024411207090cfe0a9Mon Sep 17 00:00:00 2001
From: Bill Kuzeja <[email protected]>
Date: Thu, 25 May 2017 15:26:31 -0400
Subject: scsi: qla2xxx: Fix extraneous ref on sp's after adapter break
From: Bill Kuzeja <[email protected]>
commit 4cd3b6ebff8510b2139d64024411207090cfe0a9 upstream.
Hung task timeouts can result if a qlogic board breaks unexpectedly while running I/O. These tasks become hung because command srb reference counts are not going to zero, hence the affected srbs and commands do not get freed. This fix accounts for this extra reference in the srbs in the case of a board failure.
--- drivers/scsi/qla2xxx/qla_os.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/scsi/qla2xxx/qla_os.c +6 -2
@@ -1443,7 +1443,7 @@ qla2x00_loop_reset(scsi_qla_host_t *vha)void qla2x00_abort_all_cmds (scsi_qla_host_t *vha,int res) { -int que, cnt; +int que, cnt, status;unsigned long flags;srb_t *sp;struct qla_hw_data *ha = vha->hw;
@@ -1473,8 +1473,12 @@ qla2x00_abort_all_cmds(scsi_qla_host_t **/ sp_get (sp);spin_unlock_irqrestore (&ha->hardware_lock, flags); -qla2xxx_eh_abort (GET_CMD_SP (sp)); + status =qla2xxx_eh_abort (GET_CMD_SP (sp));spin_lock_irqsave (&ha->hardware_lock, flags); +/* Get rid of extra reference if immediate exit +* from ql2xxx_eh_abort */ +if (status ==FAILED && (qla2x00_isp_reg_stat (ha))) +atomic_dec (&sp->ref_count); } req->outstanding_cmds[cnt] =NULL ; sp->done (vha, sp, res);
Patches currently in stable-queue which might be from [email protected] are
queue-4.9/scsi-qla2xxx-fix-extraneous-ref-on-sp-s-after-adapter-break.patch