Commit Graph

6608 Commits

Author SHA1 Message Date
Bart Van Assche
59adeb50f2 Merge branch 'svn-trunk' 2019-03-21 19:28:46 -07: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
4b46dbb9eb Merge branch 'svn-trunk' 2019-03-20 19:56:52 -07: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
b0c5b0e238 Merge branch 'svn-trunk' 2019-03-19 19:07:29 -07: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
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