Commit Graph

532 Commits

Author SHA1 Message Date
Vladislav Bolkhovitin
ae2b9dc782 Merged revisions 7272 via svnmerge from
svn+ssh://svn.code.sf.net/p/scst/svn/trunk

........
  r7272 | bvassche | 2017-12-19 16:35:40 +0000 (Tue, 19 Dec 2017) | 1 line
  
  iscsi-scst: UEK 4.1.12-103.9.7.el7uek.x86_64 build fix


git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.3.x@7289 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-12-23 04:41:26 +00:00
Vladislav Bolkhovitin
129cac067c Merged revisions 7253-7266,7268-7271 via svnmerge from
svn+ssh://svn.code.sf.net/p/scst/svn/trunk

........
  r7253 | vlnb | 2017-10-11 20:22:02 -0700 (Wed, 11 Oct 2017) | 3 lines
  
  scst: add example of active non-optimized setup
........
  r7254 | bvassche | 2017-10-12 07:56:44 -0700 (Thu, 12 Oct 2017) | 1 line
  
  qla2x00t: Fix scst_debug.h include path for the in-tree build
........
  r7255 | bvassche | 2017-10-12 08:03:13 -0700 (Thu, 12 Oct 2017) | 1 line
  
  scripts/specialize-patch: Fix #elif handling
........
  r7256 | vlnb | 2017-10-13 19:18:56 -0700 (Fri, 13 Oct 2017) | 3 lines
  
  Unpdate for kernels 4.12+
........
  r7257 | bvassche | 2017-11-11 21:01:16 -0800 (Sat, 11 Nov 2017) | 1 line
  
  iscsi-scst/usr/Makefile: Pass -Wno-format-truncation if supported
........
  r7258 | bvassche | 2017-11-12 21:48:16 -0800 (Sun, 12 Nov 2017) | 4 lines
  
  ib_srpt: Kernel 4.14 build fix
  
  Signed-off-by: Peter Vyazovik <fuzzhead0@gmail.com>
........
  r7259 | bvassche | 2017-11-12 21:49:08 -0800 (Sun, 12 Nov 2017) | 1 line
  
  scst: Introduce the kernel v4.14 bio_set_dev() macro
........
  r7260 | bvassche | 2017-11-12 21:50:44 -0800 (Sun, 12 Nov 2017) | 5 lines
  
  scst, iscsi-scst: Introduce scst_read(), scst_write(), scst_readv() and scst_writev()
  
  This makes it easier to add support for new kernel versions, e.g. kernel
  version v4.14.
........
  r7261 | bvassche | 2017-11-13 08:00:09 -0800 (Mon, 13 Nov 2017) | 1 line
  
  scst/src/scst_lib.c: Fix recently introduced checkpatch complaints
........
  r7262 | bvassche | 2017-11-13 08:18:00 -0800 (Mon, 13 Nov 2017) | 4 lines
  
  scst: Fix build for kernels 3.15 and older
  
  blk_rq_set_block_pc() was introduced in kernel 3.16.
........
  r7263 | bvassche | 2017-11-13 08:24:16 -0800 (Mon, 13 Nov 2017) | 1 line
  
  nightly build: Update kernel versions
........
  r7264 | bvassche | 2017-11-13 08:47:10 -0800 (Mon, 13 Nov 2017) | 1 line
  
  scst: Address two checkpatch warnings
........
  r7265 | bvassche | 2017-11-13 08:47:43 -0800 (Mon, 13 Nov 2017) | 1 line
  
  scst/src/scst_targ: Use READ_ONCE() instead of ACCESS_ONCE()
........
  r7266 | bvassche | 2017-11-13 08:49:39 -0800 (Mon, 13 Nov 2017) | 1 line
  
  fcst/fcst.h: Add identifier names
........
  r7268 | bvassche | 2017-11-14 08:37:24 -0800 (Tue, 14 Nov 2017) | 1 line
  
  scst: Fix kernel <= 2.6.30 build
........
  r7269 | bvassche | 2017-11-14 18:45:57 -0800 (Tue, 14 Nov 2017) | 1 line
  
  nightly/bin/nightly: Clone the source code tree quietly
........
  r7270 | bvassche | 2017-11-14 18:47:06 -0800 (Tue, 14 Nov 2017) | 1 line
  
  nightly build: Update kernel versions
........
  r7271 | bvassche | 2017-11-14 18:48:03 -0800 (Tue, 14 Nov 2017) | 1 line
  
  nightly/conf/nightly.sendmail: Use mail if mutt is not available
........


git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.3.x@7288 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-12-23 04:30:51 +00:00
Vladislav Bolkhovitin
e5d322d4ab Merged revisions 7233-7244 via svnmerge from
svn+ssh://svn.code.sf.net/p/scst/svn/trunk

........
  r7233 | bvassche | 2017-09-20 08:09:38 -0700 (Wed, 20 Sep 2017) | 4 lines
  
  ib_srpt: Support systems with more than 255 CPU cores
  
  Signed-off-by: Kirill Malkin <kirillmalkin.km@gmail.com>
........
  r7234 | bvassche | 2017-09-24 18:52:53 -0700 (Sun, 24 Sep 2017) | 2 lines
  
  iscsi-scst/Makefile: Change MOFED path into /usr/src/ofa_kernel/default
........
  r7235 | bvassche | 2017-09-25 16:35:49 -0700 (Mon, 25 Sep 2017) | 1 line
  
  iscsi-scst/Makefile, Ubuntu: Simplify code for version querying
........
  r7236 | bvassche | 2017-10-02 16:56:47 -0700 (Mon, 02 Oct 2017) | 1 line
  
  scripts/specialize-patch: Process ENABLE_NPIV and FC_VPORT_CREATE_DEFINED correctly
........
  r7237 | bvassche | 2017-10-02 17:04:53 -0700 (Mon, 02 Oct 2017) | 2 lines
  
  scripts/generate-kernel-patch: Fix a regression introduced in r7164
........
  r7238 | bvassche | 2017-10-02 17:05:42 -0700 (Mon, 02 Oct 2017) | 1 line
  
  scripts/specialize-patch: Process CONFIG_SCST_STRICT_SERIALIZING correctly
........
  r7239 | bvassche | 2017-10-03 15:49:35 -0700 (Tue, 03 Oct 2017) | 1 line
  
  isert-scst: Make an error message more informative
........
  r7240 | bvassche | 2017-10-03 16:08:29 -0700 (Tue, 03 Oct 2017) | 1 line
  
  scst: Port to kernel v4.13
........
  r7241 | bvassche | 2017-10-03 16:10:03 -0700 (Tue, 03 Oct 2017) | 1 line
  
  nightly build: Update kernel versions
........
  r7242 | bvassche | 2017-10-05 09:57:27 -0700 (Thu, 05 Oct 2017) | 1 line
  
  scst: Port to openSUSE Leap 42.x
........
  r7243 | bvassche | 2017-10-05 16:48:25 -0700 (Thu, 05 Oct 2017) | 1 line
  
  fcst: Port to openSUSE Leap
........
  r7244 | bvassche | 2017-10-05 16:48:51 -0700 (Thu, 05 Oct 2017) | 1 line
  
  qla2x00t: Port to openSUSE Leap
........


git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.3.x@7246 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-10-06 04:51:04 +00:00
Bart Van Assche
0518777b2d iscsi-scst: Suppress a recently introduced compiler warning
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7222 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-08-27 22:20:01 +00:00
Bart Van Assche
cc2b24478c iscsi-scst/kernel/event.c: Port to kernel v4.12
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7219 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-08-27 15:53:16 +00:00
Bart Van Assche
9e35afe1e0 Annotate fall-through in switch statements in a form recognized by gcc 7
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7216 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-08-27 15:28:57 +00:00
Vladislav Bolkhovitin
41a287734f iscsi-scst: fix a couple of bad-function-cast warnings
This is a "marginal" warning, but there are only six of them in the SCST code
and this fixes two of those.

session.c:105:4: warning: cast from function call of type void * to non-matching type _Bool [-Wbad-function-cast]
target.c:668:14: warning: cast from function call of type void * to non-matching type _Bool [-Wbad-function-cast]

Signed-off-by: David Butterfield <dab21774@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7200 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-06-01 03:53:08 +00:00
Vladislav Bolkhovitin
e5e4531049 iscsi-scst: cleanup
There's no need to end-align the padding. Plus, it's not optimal to
access front misaligned memory

Reported-by: David Butterfield <dab21774@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7195 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-05-25 02:11:06 +00:00
Bart Van Assche
81f80e1708 isert-scst: Fix a race condition that was introduced accidentally in r7184
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7186 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-05-16 02:04:47 +00:00
Bart Van Assche
830369e50d isert-scst: Avoid that shutdown sporadically hangs
Waiting for other threads to release an object using code like
"while (object->refcnt > 0) msleep(100)" without holding a reference
on 'object' is wrong because the memory object points at may be freed
before or while this loop is in progress. Hence introduce a global
portal object count and wait on that count instead of waiting for
the per-portal reference count to reach zero.

The use-after-free was introduced in r6952 ("isert: faster release
of isert_scst module").

See also https://sourceforge.net/p/scst/tickets/2/.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7184 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-05-14 18:53:01 +00:00
Bart Van Assche
cda5cadb1c isert-scst: Enable type checking for isert portal pointers
This patch does not change any functionality.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7183 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-05-14 18:49:04 +00:00
Israel Rukshin
28c5d73550 isert-scst: fix isert connection teardown flow
Synchronizing the rdma_disconnect() with the post drain wr
as other ULPs like iSER do.

Signed-off-by: Israel Rukshin <israelr@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7181 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-05-14 13:45:02 +00:00
Bart Van Assche
b4118ea0f1 scst/include/backport.h: Add a kref_read() backport
This patch does not change any functionality.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7178 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-05-14 03:06:54 +00:00
Bart Van Assche
642744c9fc Fix spelling of "Ardis Technologies"
Reference: http://www.ddpsan.com/support-sales/about-us.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7165 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-05-02 22:32:06 +00:00
Bart Van Assche
0c83846917 Surround #include <linux/version.h> with #ifndef INSIDE_KERNEL_TREE / #endif
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7157 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-05-01 20:26:08 +00:00
Bart Van Assche
909247cb3d scst: Port to Linux kernel v4.11
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7153 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-04-27 00:17:22 +00:00
Vladislav Bolkhovitin
68fa7e1a0d Copyright updates
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7146 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-04-22 03:19:52 +00:00
Vladislav Bolkhovitin
a8b24ae319 iscsi_scst: conn_lookup() skips any conn already closing
This change helped a secondary problem I had under valgrind (due to some other
bug) with initiators timing out and reconnecting their sessions faster than the
threads were getting cleaned up (for one thing, valgrind only ever runs one
thread at a time).

It seems logical that the code in conn_lookup() would want to skip any
connection that's already known closing in this case, for the same reason it
searches the list in reverse.  And the dropping connections don't have to drop
in order, so searching in reverse doesn't seem sufficient to avoid finding a
wrong (stale, closing) connection structure.

Signed-off-by: David Butterfield <dab21774@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7144 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-04-21 01:36:34 +00:00
Vladislav Bolkhovitin
296f133caf iscsi-scst: fix ENOMEM path
In an error path in iscsi_threads_pool_get(), when a new pool cannot be
allocated, if there is a pool on iscsi_thread_pools_list, it passes that back as
an alternative, so return zero in that case.

Signed-off-by: David Butterfield <dab21774@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7143 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-04-21 01:32:07 +00:00
Vladislav Bolkhovitin
0e92843d30 iscsi-scst: reset conn->rx_task in scsi_cmnd_start() for EXTRACHECKS
In scsi_cmnd_start() conn->rx_task is intended to be set only during the
call to _stage1_done, but there was no code to reset it.  It doesn't
actually matter in execution, but it was a little confusing to wonder
and try to understand why it wasn't reset.

Signed-off-by: David Butterfield <dab21774@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7142 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-04-21 01:17:53 +00:00
Vladislav Bolkhovitin
a8336afa4c iscsi-scst: change local names of ioctl() and open() to not conflict
Change local names of ioctl() and open() to not conflict with C library names.
This isn't really a bug in a strictly kernel-resident build, but the change
avoids symbol conflicts with libc when building for usermode.

Signed-off-by: David Butterfield <dab21774@gmail.com>

with some changes



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7138 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-04-21 00:57:10 +00:00
Vladislav Bolkhovitin
eaa99a8770 Fix a few minor "extra" compiler warnings (mostly "const" issues)
Add "XXX" comments in a few places about potential problems seen in SCST code,
for future investigation and possible repair.

Signed-off-by: David Butterfield <dab21774@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7123 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-04-14 01:03:25 +00:00
Vladislav Bolkhovitin
a2e0916fbf Fix a few compiler messages issued when some extra warnings are enabled:
casting const to non-const
    uninitialized structure members
    non-static local function
    missing enumerated switch-value cases

Signed-off-by: David Butterfield <dab21774@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7122 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-04-13 23:58:32 +00:00
Vladislav Bolkhovitin
baba3ad195 iscsi: avoid a crash in iscsi_extracheck_is_rd_thread()
Add an extra check in iscsi_extracheck_is_rd_thread() to avoid a crash when
conn->rd_task is NULL.

Signed-off-by: David Butterfield <dab21774@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7111 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-04-13 23:12:46 +00:00
Vladislav Bolkhovitin
2331e8ec33 Thre is potential buffer overflow in iscsi_session_alloc() due to
short computation of needed string size.  Notice the "%s@%s" in the first call
to sprintf().

Signed-off-by: David Butterfield <dab21774@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7110 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-04-13 23:02:18 +00:00
Bart Van Assche
e372a0123e scst: Coding style updates related to whitespace
This patch changes whitespace only and nothing else.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7102 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2017-03-02 00:09:14 +00:00
Bart Van Assche
9cbe881f2f isert-scst: Fix CentOS 7.3 build
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7084 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-12-27 20:26:11 +00:00
Vladislav Bolkhovitin
c9b301bf39 iscsi-scst: add per_sess_dedicated_tgt_threads attribute in ini groups
If this attrubute is set, each iSCSI session for this initiator has
dedicated, i.e. not shared with other sessions, pool of the iscsi{wr,rd}
kernel threads.

Useful to control per-session CPU affinity to improve performance.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7069 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-12-20 06:00:43 +00:00
Vladislav Bolkhovitin
df55eeb5da Minor misc changes
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7068 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-12-20 05:55:19 +00:00
Vladislav Bolkhovitin
bb2f47e7a8 iscsi-scst: add target_ip attribute
It adds target_ip attribute containing target IP address in each
/sys/kernel/scst_tgt/targets/iscsi/TARGET/sessions/INITIATOR/INITIATOR_IP subdirectory.

It's useful to simplify monitoring management utilities



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7067 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-12-20 05:53:48 +00:00
Vladislav Bolkhovitin
80e49beea8 Put_page_callback and scst_exec_req_fifo patches for RHEL5/6
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7066 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-12-20 05:49:07 +00:00
Bart Van Assche
7f1d8c91b1 iscsi-scst: Port to Linux kernel versions >= v4.7
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7021 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-10-26 21:33:50 +00:00
Bart Van Assche
599a059cf8 isert-scst: Port to Linux kernel v4.9
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7020 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-10-25 22:22:07 +00:00
Bart Van Assche
bfe9d77412 isert-scst: Cache L_Key
This patch does not change any functionality.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7019 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-10-25 22:21:46 +00:00
Vladislav Bolkhovitin
1f72d604cc iscsi-scst: fix false positive BUG_ON()
It's false positive, because responses live in the parent request's list
until last put for the parent.



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7009 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-10-14 01:30:17 +00:00
Vladislav Bolkhovitin
3c6e21704f iscsi: convert recently added BUG_ON() to EXTRACHECKS_BUG_ON()
This check is rather debug check, so should belong to debug build only



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6980 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-08-24 02:05:03 +00:00
Bart Van Assche
c19a667981 isert-scst: More MOFED 3.3 fixes for kernel versions >= 4.6.0
This is a slightly modified version of a patch from
Israel Rukshin <israelr@mellanox.com>.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6977 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-08-23 15:42:41 +00:00
Bart Van Assche
0d438351f9 iscsi-scst: Change (signed) into (signed int)
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6975 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-08-22 17:05:07 +00:00
Bart Van Assche
d2dd61c072 isert-scst, srpt: Fix build on systems with kernel >= 4.2.0 + MOFED 3.3
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6973 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-08-22 04:28:52 +00:00
Bart Van Assche
3f35afdf88 isert-scst: Convert a cast into a container_of() expression
This patch does not change any functionality.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6972 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-08-22 00:04:58 +00:00
Bart Van Assche
7f9c69ae21 isert-scst: Address checkpatch coding style complaints
This patch does not change any functionality.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6967 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-08-21 22:57:51 +00:00
Israel Rukshin
40fd212bdf isert: fix redundant module put on error flow when handling connect request
Signed-off-by: Israel Rukshin <israelr@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6958 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-08-17 07:28:52 +00:00
Israel Rukshin
0498de2100 isert: add conn to portal conn list only if rdma_accept succeeded
If rdma_accept() failed then we shouldn't call rdma_disconnect() on that QP
as the result is unexpected.

Signed-off-by: Israel Rukshin <israelr@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6957 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-08-17 07:28:47 +00:00
Israel Rukshin
183ef82731 isert: fix isert conn cleanup when rdma_accept fails
If rdma_accept fails the state of the qp is modified to error and all
posted recieve buffers will be flushed and because of the flush
the isert conn teardown flow will start.

Signed-off-by: Israel Rukshin <israelr@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6956 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-08-17 07:28:43 +00:00
Israel Rukshin
73b50bce1b isert: fix working with freed conn object
isert_delete_conn_dev function checks if it needs to close the connection
by checking that dev conn is not NULL.
We were missing set conn to null when freeing it and that caused working
with memory that was already freed.

Signed-off-by: Israel Rukshin <israelr@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6955 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-08-17 07:28:38 +00:00
Israel Rukshin
b292383396 isert: add missing fd put on error flow
Signed-off-by: Israel Rukshin <israelr@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6954 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-08-17 07:28:34 +00:00
Israel Rukshin
09d719a009 isert: fix races between conn fops read/write and disconnect flow
read/write events may arive after the isert connection has
started the teardown flow.
This scenario may occur on login logout stress.
It may lead to NULL derefrence bugs.

Signed-off-by: Israel Rukshin <israelr@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6953 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-08-17 07:28:29 +00:00
Israel Rukshin
9dee83d555 isert: faster release of isert_scst module
If there is a dead connection we don't want to wait 60 seconds for
the connection timeout error.
So when closing the portal we close now all the connections
immediately without waiting for events to arrive.

Signed-off-by: Israel Rukshin <israelr@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6952 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-08-17 07:28:25 +00:00
Israel Rukshin
45256dd888 isert: fix isert connection kref leak
To avoid rare cases when checking ISERT_CONNECTION_EST bit
may lead to kref leak, we now take the third refcount earlier
before calling to rdma_accept.

Signed-off-by: Israel Rukshin <israelr@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6951 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-08-17 07:28:20 +00:00
Israel Rukshin
87902c8722 isert: fix a race between calling to rdma_disconnect and connect flow
1) The race can happen after unreachable event handler close isert connection
and calling to rdma_disconnect from another thread on illegal cm_id.
For example call rdma_disconnect from isert_portal_release function.

2) It is also possible to get ESTABLISHED RDMACM event while rdma_disconnect
is called from another thread.
In established event we need to check conn is not in
teardown flow by checking the connection state with a mutex.

Signed-off-by: Israel Rukshin <israelr@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6950 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2016-08-17 07:28:16 +00:00