Commit Graph

5950 Commits

Author SHA1 Message Date
Bart Van Assche
fd3fa5df34 qla2x00t-32gbit, target: Remove a kvfree() call
Since the target code never assigns a value to se_sess->sess_cmd_map,
calling kvfree on that pointer is not necessary.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8095 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-29 01:33:54 +00:00
Bart Van Assche
fc4c99dccd qla2x00t-32gbit: Upgrade initiator code to the code from kernel v5.1-rc2
This patch is the output of git diff v4.18.20..v5.1-rc2 drivers/scsi/qla2xxx.
Only one manual change has been applied, namely the removal of
"cmd->se_cmd.map_cpu = cpu;" from qlt_alloc_qfull_cmd().


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8094 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-29 01:32:45 +00:00
Bart Van Assche
a65843ec45 qla2x00t-32gbit, target: Fix W=1 warnings
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8093 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-29 01:31:36 +00:00
Bart Van Assche
1bef9a0ff9 qla2x00t-32gbit, target: Fix in-tree build
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8092 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-29 01:30:34 +00:00
Bart Van Assche
b8a1634ced qla2x00t-32gbit: Import this driver into the SCST repository
The source code in this commit is a combination of the v4.18.20 qla2xxx
driver and the QLogic target driver from the QLogic git repository
(commit ac4faf74f437 ("qla2xxx: Fix session creation fail")).


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8091 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-29 01:29:46 +00:00
Bart Van Assche
e97314ebd7 scst/include/backport.h: Suppress a compiler warning triggered by including <scsi/scsi_transport_fc.h>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8090 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-29 01:27:45 +00:00
Bart Van Assche
c8533e86a4 scst/include/backport.h: Fix kvcalloc() backport
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8089 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-29 01:19:28 +00:00
Bart Van Assche
ed9cd7b1c8 scst: Fix percpu_ref_init() GFP mask
Fixes: 53fdc293e2 ("scst: Use a per-cpu counter for sessions") (trunk r8026).



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8088 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-28 16:46:21 +00:00
Bart Van Assche
2e377ec4c0 nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8087 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-28 05:10:37 +00:00
Bart Van Assche
796edfc6f8 scst/include/backport.h: Fixes for RHEL 6 and 7
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8086 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-28 02:25:41 +00:00
Bart Van Assche
23a2753a9c scst/include/backport.h: Add backports for additional kernel functions, constants and data structures
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8085 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-27 23:09:20 +00:00
Bart Van Assche
0bc77ddfd2 qla2x00t, regression tests: Move QLogic target code
Move the QLogic target code from drivers/scst/qla2x00-target/ to
drivers/scsi/qla2xxx/.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8084 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-26 02:03:17 +00:00
Bart Van Assche
bf9fd22294 scripts/generate-kernel-patch: Fix shellcheck warnings
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8083 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-26 02:02:07 +00:00
Bart Van Assche
cb194c3c1b scripts/specialize-patch: Fix handling of #endif followed by a tab
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8082 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-25 23:30:32 +00:00
Bart Van Assche
0221741457 qla2x00t: Remove instructions to rebuild the kernel
Since the zero-copy patch is no longer supported it is no longer necessary
to rebuild the kernel in order to use SCST.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8081 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-25 22:51:39 +00:00
Bart Van Assche
32261be1d8 qla2x00t/qla2x00-target/Makefile: Fix the path from where the SCST Modules.symvers file is read
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8080 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-25 22:36:03 +00:00
Bart Van Assche
dc7e039124 Makefiles: Remove most instances of $(SCST_INC_DIR)
Move the $(SCST_INC_DIR) definitions from the out-of-tree sections into
the in-kernel sections. Since SCST is now distributed as a single tar
archive, only support in-tree builds with $(SCST_INC_DIR) and $(SCST_DIR).


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8079 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-25 22:10:21 +00:00
Bart Van Assche
bd373cfa6e scst: Fix the kernel_write() backport for RHEL 6.x
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8078 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-25 22:05:10 +00:00
Bart Van Assche
60defdd286 scst_local: Remove duplicate Makefiles
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8077 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-25 20:13:11 +00:00
Bart Van Assche
70d3c72779 Makefiles: Use ccflags-y instead of EXTRA_CFLAGS
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8076 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-25 19:56:17 +00:00
Bart Van Assche
74e5b31b95 Makefiles: Use cc-option instead of enable-Wextra
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8075 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-25 19:55:15 +00:00
Bart Van Assche
623d4e6d0a Makefiles: Use build_mode instead of modifying the Makefile when switching the build mode
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8074 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-25 19:53:39 +00:00
Bart Van Assche
ef99fe40be fcst, srpt: Move the build_mode file to the top level
Additionally, rename BUILDMODE into BUILD_MODE and FCST/SRPTFLAGS into
BUILD_MODE_CFLAGS_.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8073 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-25 19:46:24 +00:00
Bart Van Assche
50bb06cc55 scst: Avoid that del_device suspends SCSI command processing
scst_unregister_virtual_device() modifies scst_dev_list and removes
the LUNs associated with the virtual device being removed. Due to 
previous patches these actions can be performed safely without
suspending SCSI command processing. Hence remove the suspend and
resume activity calls from scst_unregister_virtual_device().


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8072 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-25 16:46:43 +00:00
Bart Van Assche
6a6c844545 scst: Fix an scst_register_virtual_device_node() error path
This patch fixes commit 26d7fd0e3a ("scst: Do not suspend SCSI command
processing when adding a device") / r8025.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8071 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-25 16:41:45 +00:00
Bart Van Assche
11d56f4129 scst/include/backport.h: Fix the timer_setup() backport and add a from_timer() backport
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8070 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-25 04:19:24 +00:00
Bart Van Assche
c597df93a1 scst/include/backport.h: Make it possible to include this header file first
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8069 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-25 04:18:40 +00:00
Bart Van Assche
79d2236e79 nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8068 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-24 20:02:42 +00:00
Bart Van Assche
3f2d50b589 scst: Do not suspend command processing when deleting a device
Now that freeing a device only happens after all commands associated
with the device have finished it is safe to not suspend command
processing when deleting a device.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8067 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-22 02:26:44 +00:00
Bart Van Assche
a94c8eaf0f scst: Move the set_fs() calls into scst_{read,write}v()
This patch does not change any functionality.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8066 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-21 02:56:46 +00:00
Bart Van Assche
94018a42e3 scst: Use kernel_{read,write}() instead of scst_{read,write}()
This patch does not change any functionality.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8065 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-21 02:56:02 +00:00
Bart Van Assche
43a252aef2 scst, ib_srpt: Add support for kernel version v5.1
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8064 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-21 02:54:31 +00:00
Bart Van Assche
48858f0aec scstadmin: Write output of test 09 into a file with 09 in its name
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8063 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-21 02:53:32 +00:00
Bart Van Assche
da8b868a31 scstadmin: Fix a recently enabled warning
Avoid that the following warning is reported when restoring a config
file that refers to a user space handler:

Use of uninitialized value $value in scalar chomp at /usr/local/share/perl5/SCST/SCST.pm line 2688.

Reported-by: Rob Turk <robtu@rtist.nl>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8062 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-20 02:07:16 +00:00
Bart Van Assche
eb83c6971b scst: Add a round_up() backport
A call to round_up() was introduced in r7854 / commit 434207ab53.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8061 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-20 02:01:13 +00:00
Bart Van Assche
9030abc19d nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8060 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-19 13:50:00 +00:00
Bart Van Assche
3b76bc5b1f Use KERNEL_DS instead of get_ds()
This patch is necessary to make SCST work with Linux kernel v5.1 and
does not change any functionality. See also upstream commit 736706bee329
("get rid of legacy 'get_ds()' function").



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8057 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-18 00:24:56 +00:00
Bart Van Assche
0655c3e76a iscsi-scst: Fix a use-after-free
Avoid that KASAN reports the following complaint:

BUG: KASAN: slab-out-of-bounds in f/0xdc4 [iscsi_scst]
Read of size 8 at addr ffff888be35fd0ec by task iscsiwr0_71/3289

CPU: 42 PID: 3289 Comm: iscsiwr0_71 Tainted: G
sos.debug #1
Hardware name: To be filled by O.E.M.
Call Trace:
 dump_stack+0x8e/0xc8
 print_address_description+0x73/0x238
 kasan_report+0x228/0x251
 check_memory_region+0x126/0x12c
 __asan_loadN+0xf/0x11
 write_data+0x5df/0xdc4 [iscsi_scst]
 iscsi_do_send+0x20/0x67 [iscsi_scst]
 iscsi_send+0x1f0/0x574 [iscsi_scst]
 scst_do_job_wr+0x2ef/0x549 [iscsi_scst]
 istwr+0x366/0x4a2 [iscsi_scst]
 kthread+0x1df/0x1ef
 ret_from_fork+0x3a/0x50

Allocated by task 3063:
 save_stack_trace+0x1b/0x1d
 kasan_kmalloc.part.1+0x62/0xee
 kasan_kmalloc+0x7f/0x8b
 kasan_slab_alloc+0x12/0x14
 kmem_cache_alloc+0x13d/0x27a
 mempool_alloc_slab+0x15/0x17
 mempool_alloc+0xdb/0x1f3
 scst_alloc_aen+0x96/0x223 [scst]
 scst_gen_aen_or_ua+0x16b/0x3d2 [scst]
 scst_capacity_data_changed+0x147/0x1cd [scst]
 vdev_size_process_store+0x1b5/0x1f4 [scst_vdisk]
 scst_process_sysfs_works+0x187/0x2a1 [scst]
 sysfs_work_thread_fn+0x301/0x42b [scst]
 kthread+0x1df/0x1ef
 ret_from_fork+0x3a/0x50

Reported-by: Marc Smith <msmith626@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8056 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-18 00:23:05 +00:00
Bart Van Assche
609396d2bf nightly build: Only use kernel versions that are available on kernel.org
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8055 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-15 04:24:40 +00:00
Bart Van Assche
304766529e scripts/generate-kernel-patch: Only include fcst for kernel versions >= 2.6.37
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8054 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-14 01:49:26 +00:00
Bart Van Assche
4c09bc9db7 scst: Add a pr_warn_once() backport
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8053 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-14 01:48:24 +00:00
Bart Van Assche
c87e440fab nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8052 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-14 01:18:13 +00:00
Bart Van Assche
0a01b504e0 iscsi-isert: Avoid that reading the target_ip sysfs attribute triggers a kernel oops
conn->sock is set by the TCP/IP transport but not by the iSER transport.
Hence check the conn->sock pointer from common code before dereferencing it.

Reported-by: Doug Dumitru <doug@easyco.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8051 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-11 03:58:30 +00:00
Bart Van Assche
d1f7b0aae8 iscsi-scst: Fix multiple checkpatch warnings
This patch does not change any functionality.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8050 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-11 03:57:09 +00:00
Bart Van Assche
3f7216ce2a fcst: Fix multiple checkpatch warnings
This patch does not change any functionality.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8049 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-11 03:50:11 +00:00
Bart Van Assche
41e8fe860c scripts/checkpatch: Add --ignore=LONG_LINE_STRING
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8048 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-11 03:48:26 +00:00
Bart Van Assche
c8d8d7fbbe isert-scst: Fix several checkpatch warnings
This patch does not change any functionality.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8047 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-11 03:47:48 +00:00
Bart Van Assche
a4c05a4b31 scst: Backport the percpu-ref code to kernel version 3.17 and before
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8046 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-11 02:53:24 +00:00
Bart Van Assche
b9969a09a5 scst: Simplify the percpu-ref code for RHEL 7
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8045 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-11 02:51:09 +00:00
Bart Van Assche
3d35b7477f scst: Avoid switching explicitly to per-cpu
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8044 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-11 02:50:21 +00:00