Gleb Chesnokov 4401a3e064 qla2x00t-32gbit: Do not call scst_unregister_target() twice
If there are any NPIV targets, sqa_exit() will call
scst_unregister_target() twice on them. The first is an explicit call,
the other is triggered by qlt_del_vtarget().

Calling scst_unregister_target() twice on the same target will cause
crash:

RIP: 0010:sqa_target_release+0x19/0x220 [qla2x00tgt]
Call Trace:
  scst_unregister_target+0x8e/0x330 [scst]
  sqa_qla2xxx_remove_target+0x63/0x70 [qla2x00tgt]
  qlt_release+0x1e0/0x260 [qla2xxx_scst]
  qlt_remove_target+0x46/0x1d0 [qla2xxx_scst]
  qla24xx_vport_delete+0x92/0x1e0 [qla2xxx_scst]
  fc_vport_terminate+0x45/0x170 [scsi_transport_fc]
  qlt_del_vtarget+0x142/0x15d [qla2x00tgt]
  fc_vport_terminate+0x45/0x170 [scsi_transport_fc]
  qlt_del_vtarget+0x142/0x15d [qla2x00tgt]
  sqa_exit+0xad/0xde4 [qla2x00tgt]

Therefore, call scst_unregister_target() only from qlt_del_vtarget()
2022-05-17 11:26:02 +03:00
2021-08-17 09:40:21 -04:00
2022-01-11 16:37:34 +03:00
2022-05-16 11:39:37 +03:00
2022-01-11 16:37:34 +03:00
2021-03-15 04:06:56 +00:00
2021-12-07 00:18:44 +03:00

Overview

This is the source code repository of the SCST project. SCST is a collection of Linux kernel drivers that implement SCSI target functionality. The SCST project includes:

  1. The SCST core in the scst/ subdirectory.
  2. A tool for loading, saving and modifying the SCST configuration in directory scstadmin/.
  3. Several SCSI target drivers in the directories iscsi-scst/, qla2x00t/, srpt/, scst_local/ and fcst/.
  4. User space programs in the usr/ subdirectory, e.g. fileio_tgt.
  5. Various documentation in the doc/ subdirectory.

Instructions for building and installing SCST are available in the INSTALL.md file.

QLogic target driver

Two QLogic target drivers are included in the SCST project.

The default driver is located in qla2x00t-32gbit directory and it supports up to 32 Gb/s FC. It is the newer one.

May anyone wish to switch back to the older driver that only supported up to 16 Gb/s adapters, it is located in qla2x00t directory. To make use of the older driver build scst with environment variable QLA_32GBIT=no set.

Vladislav Bolkhovitin vst@vlnb.net, http://scst.sourceforge.net

Sourceforge achievements

Description
No description provided
Readme 33 MiB
Languages
C 90.1%
Perl 4.2%
Shell 1.8%
HTML 1.7%
Makefile 1.2%
Other 0.9%