Bart Van Assche
b95c750330
.gitignore: Update
2019-03-19 18:58:24 -07:00
Bart Van Assche
b6b571b681
Merge branch 'svn-trunk'
2019-03-19 07:12:10 -07: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
17328b22e0
Merge branch 'svn-trunk'
2019-03-17 19:13:39 -07: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
e9f53e75c2
Merge branch 'svn-trunk'
2019-03-14 21:26:33 -07: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
2552c4dbef
Merge branch 'svn-trunk'
2019-03-13 18:49:43 -07: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
6eafb68d16
Merge branch 'svn-trunk'
2019-03-10 20:58:41 -07: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
ecfe675da0
Merge branch 'svn-trunk'
2019-03-10 20:57:16 -07: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
06b7673ff9
Merge branch 'svn-trunk'
2019-03-10 19:53:49 -07: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
85249ae413
Merge branch 'svn-trunk'
2019-03-10 10:05:47 -07: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
0eacad533b
Merge branch 'svn-trunk'
2019-03-09 21:22:39 -08: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
56e98a2deb
Merge branch 'svn-trunk'
2019-03-09 20:45:29 -08: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
ca8ef0eef5
Merge branch 'svn-trunk'
2019-03-09 20:43:42 -08: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
46879ebd2a
Merge branch 'svn-trunk'
2019-03-09 18:28:59 -08: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
9fcbfdec97
Merge branch 'svn-trunk'
2019-03-09 17:31:56 -08: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
3c86e2773f
Merge branch 'svn-trunk'
2019-03-09 15:15:07 -08:00