Bart Van Assche c5ff6adeae Fix unloading of scst_vdisk while I/O is ongoing
Call scst_free_device() directly instead of when the final dev->refcnt
put happens. Call scst_assign_dev_handler(dev, &scst_null_devtype) after
processing of I/O commands for 'dev' has finished. Hold the RCU read lock
while invoking percpu_ref_get(&dev->refcnt) in the LUN translation code.
This patch fixes the following crash when scst_vdisk is unloaded while I/O
is ongoing:

BUG: unable to handle kernel NULL pointer dereference at 0000000000000368
IP: [<ffffffffc09a80b3>] blockio_exec+0x43/0x250 [scst_vdisk]
 [<ffffffffc14fea1b>] scst_do_real_exec+0x5b/0x240 [scst]
 [<ffffffffc150172f>] scst_exec_check_blocking+0x12f/0x250 [scst]
 [<ffffffffc1503791>] scst_process_active_cmd+0x91/0x1640 [scst]

Fixes: 3f2d50b589 ("scst: Do not suspend command processing when deleting a device")
Reported-by: Rongqing Tu <rongqing.tu@hpe.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9048 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2020-07-12 23:35:03 +00:00
2020-07-05 02:14:28 +00:00
2020-05-29 07:34:24 +00:00
2020-05-17 20:58:38 +00:00
2020-06-13 16:57:19 +00:00
2019-12-04 05:09:52 +00: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 driver in the qla2x00t directory is a very stable driver that supports up to 16 Gb/s adapters. It is very stable, well tested and actively used in many production setups.

There is also a newer driver that supports 32 Gb/s FC in the qla2x00t-32gbit directory. That driver has not yet reached the same maturity level as the old qla2x00t driver.

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

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%