2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2025-01-06 12:44:14 +08:00
linux-next/drivers/scsi/qla2xxx
Quinn Tran f159b3c7cd qla2xxx: Fix sess_lock & hardware_lock lock order problem.
The main lock that needs to be held for CMD or TMR submission
to upper layer is the sess_lock. The sess_lock is used to
serialize cmd submission and session deletion. The addition
of hardware_lock being held is not necessary. This patch removes
hardware_lock dependency from CMD/TMR submission.

Use hardware_lock only for error response in this case.

Path1
       CPU0                    CPU1
       ----                    ----
  lock(&(&ha->tgt.sess_lock)->rlock);
                               lock(&(&ha->hardware_lock)->rlock);
                               lock(&(&ha->tgt.sess_lock)->rlock);
  lock(&(&ha->hardware_lock)->rlock);

Path2/deadlock
*** DEADLOCK ***
Call Trace:
dump_stack+0x85/0xc2
print_circular_bug+0x1e3/0x250
__lock_acquire+0x1425/0x1620
lock_acquire+0xbf/0x210
_raw_spin_lock_irqsave+0x53/0x70
qlt_sess_work_fn+0x21d/0x480 [qla2xxx]
process_one_work+0x1f4/0x6e0

Cc: <stable@vger.kernel.org>
Cc: Bart Van Assche <Bart.VanAssche@sandisk.com>
Reported-by: Bart Van Assche <Bart.VanAssche@sandisk.com>
Signed-off-by: Quinn Tran <quinn.tran@cavium.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
2017-03-18 17:28:08 -07:00
..
Kconfig tcm_qla2xxx Add SCSI command jammer/discard capability 2016-05-10 01:27:17 -07:00
Makefile
qla_attr.c qla2xxx: Allow vref count to timeout on vport delete. 2017-03-18 17:27:56 -07:00
qla_bsg.c Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2017-03-02 14:52:05 -08:00
qla_bsg.h qla2xxx: Add bsg interface to support statistics counter reset. 2016-07-15 15:35:37 -04:00
qla_dbg.c scsi: qla2xxx: Add multiple queue pair functionality. 2016-12-14 15:37:58 -05:00
qla_dbg.h qla2xxx: Change copyright year to 2014 in all the source files. 2014-05-19 13:31:02 +02:00
qla_def.h qla2xxx: Allow vref count to timeout on vport delete. 2017-03-18 17:27:56 -07:00
qla_devtbl.h
qla_dfs.c qla2xxx: Track I-T nexus as single fc_port struct 2017-02-08 23:34:07 -08:00
qla_fw.h qla2xxx: Improve RSCN handling in driver 2017-02-09 00:39:02 -08:00
qla_gbl.h qla2xxx: Simplify usage of SRB structure in driver 2017-02-09 00:39:03 -08:00
qla_gs.c Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2017-03-02 14:52:05 -08:00
qla_init.c qla2xxx: Allow vref count to timeout on vport delete. 2017-03-18 17:27:56 -07:00
qla_inline.h qla2xxx: Simplify usage of SRB structure in driver 2017-02-09 00:39:03 -08:00
qla_iocb.c qla2xxx: Simplify usage of SRB structure in driver 2017-02-09 00:39:03 -08:00
qla_isr.c SCSI misc on 20170303 2017-03-03 21:36:56 -08:00
qla_mbx.c qla2xxx: Improve RSCN handling in driver 2017-02-09 00:39:02 -08:00
qla_mid.c qla2xxx: Allow vref count to timeout on vport delete. 2017-03-18 17:27:56 -07:00
qla_mr.c Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2017-03-02 14:52:05 -08:00
qla_mr.h qla2xxx: Adjust adapter reset routine to the changes in firmware specification for ISPFx00. 2014-05-19 13:31:03 +02:00
qla_nx2.c qla2xxx: Move two arrays from header files to .c files 2017-01-17 11:26:41 -08:00
qla_nx2.h qla2xxx: Move two arrays from header files to .c files 2017-01-17 11:26:41 -08:00
qla_nx.c qla2xxx: Move two arrays from header files to .c files 2017-01-17 11:26:41 -08:00
qla_nx.h qla2xxx: Move two arrays from header files to .c files 2017-01-17 11:26:41 -08:00
qla_os.c qla2xxx: Allow vref count to timeout on vport delete. 2017-03-18 17:27:56 -07:00
qla_settings.h qla2xxx: Change copyright year to 2014 in all the source files. 2014-05-19 13:31:02 +02:00
qla_sup.c Replace <asm/uaccess.h> with <linux/uaccess.h> globally 2016-12-24 11:46:01 -08:00
qla_target.c qla2xxx: Fix sess_lock & hardware_lock lock order problem. 2017-03-18 17:28:08 -07:00
qla_target.h qla2xxx: Remove unused reverse_ini_mode 2017-02-09 00:39:02 -08:00
qla_tmpl.c qla2xxx: Include ATIO queue in firmware dump when in target mode 2017-01-17 11:26:53 -08:00
qla_tmpl.h qla2xxx: ISP27xx fwdump template error print simplification. 2014-09-25 14:25:02 +02:00
qla_version.h qla2xxx: Update driver version to 8.07.00.38-k 2016-07-15 15:35:52 -04:00
tcm_qla2xxx.c SCSI misc on 20170303 2017-03-03 21:36:56 -08:00
tcm_qla2xxx.h qla2xxx: Track I-T nexus as single fc_port struct 2017-02-08 23:34:07 -08:00