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
Bart Van Assche
34cf8f2d5d
scripts/run-regression-tests: Make sure CONFIG_STACK_VALIDATION is disabled
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8043 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-10 17:05:20 +00:00
Bart Van Assche
68b40638de
scripts/specialize-patch: Add support for UEK_KABI_RENAME
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8042 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-10 16:45:23 +00:00
Bart Van Assche
c9d03b0275
scst: Remove recently introduced trailing whitespace
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8041 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-10 16:35:14 +00:00
Bart Van Assche
eb6a056300
scst, LUN replacement: Add a missing if-test
...
This was detected by smatch.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8040 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-10 16:31:48 +00:00
Bart Van Assche
b80e470e36
scst: Remove recently introduced trailing whitespace
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8039 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-10 16:28:37 +00:00
Bart Van Assche
f7e7b5f17f
nightly build: Update kernel versions
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8038 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-10 16:23:16 +00:00
Bart Van Assche
c03a6ffd5e
scst, backport.h: Fix RHEL 7 build
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8037 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-10 05:18:41 +00:00
Bart Van Assche
c9680a33ec
scst: Add a percpu_ref backport for kernel versions before 3.11, e.g. RHEL 6
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8036 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-10 05:14:42 +00:00
Bart Van Assche
f2342573a1
scst: Rework per-device command reference counting
...
Restore the original meaning of dev_cmd_count and introduce the refcnt
member.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8035 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-10 04:45:00 +00:00
Bart Van Assche
9380e29a27
scst, tgt_dev: Hold a reference on struct scst_device
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8034 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-10 04:43:31 +00:00
Bart Van Assche
e161c14a57
scst, acg_dev: Hold a reference on struct scst_device
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8033 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-10 04:40:49 +00:00
Bart Van Assche
ec3c6b5a11
scst_copy_mgr, initial inquiry: Hold a reference on struct scst_device
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8032 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-10 04:39:05 +00:00
Bart Van Assche
3bcc08ebed
scst_vdisk: Hold a reference on the associated struct scst_device
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8031 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-10 04:38:33 +00:00
Bart Van Assche
cdfabd20ed
scst_lib: Remove a superfluous if-condition
...
Since earlier code dereferences res->tgt_dev, res->tgt_dev can't be
NULL when the if (res->tgt_dev) code is reached. Hence remove the
if (res->tgt_dev != NULL) check.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8030 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-10 04:37:52 +00:00
Bart Van Assche
5a17d29821
scst_targ: Add a consistency check in __scst_rx_cmd()
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8029 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-10 04:33:51 +00:00
Bart Van Assche
b87aa0f004
fcst: Remove support for kernel versions <= 2.6.36
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8028 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-10 02:28:44 +00:00
Bart Van Assche
759bdca73a
scst: Use a per-cpu counter to track the number of commands per device
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8027 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-10 01:24:43 +00:00
Bart Van Assche
53fdc293e2
scst: Use a per-cpu counter for sessions
...
Make scst_alloc_session() initialize sess->refcnt to 1 instead of 0.
Compensate this by removing an scst_get() call from __scst_register_session().
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8026 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-10 01:18:17 +00:00
Bart Van Assche
26d7fd0e3a
scst: Do not suspend SCSI command processing when adding a device
...
Since the only global data structure that is modified by the code that adds
a device (scst_dev_list) is consistently protected by scst_mutex, suspending
command processing when adding a device is not necessary.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8025 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-10 01:10:11 +00:00
Bart Van Assche
46698cc77d
scstadmin: Enable Perl warnings
...
Make the Perl interpreter complain about dubious Perl constructs.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8024 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-10 01:01:59 +00:00
Bart Van Assche
398af246b5
scst: Remove an empty directory
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8023 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-09 23:12:50 +00:00
Bart Van Assche
78d6da4517
scst: Remove obsolete exec_req_fifo kernel patches
...
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8022 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2019-03-09 23:11:47 +00:00