It is possible to get ESTABLISHED RDMACM event while the connection
is already started teardown flow (i.e. addr change).
At teardown the refcount is reduced to zero and we start releasing the
connection. In established event We need to check conn is not in teardown
flow by checking its ref count is not 0.
Signed-off-by: Israel Rukshin <israelr@mellanox.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6879 d57e44dd-8a1f-0410-8b47-8ef2f437770f
The tmo timer is set when allocating a new connection.
We need to release it in case it didn't execute yet.
Else timer execution will lead to a NULL dereference bug on conn.
Signed-off-by: Israel Rukshin <israelr@mellanox.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6878 d57e44dd-8a1f-0410-8b47-8ef2f437770f
There is a race between RDMACM event handler and isert_conn_free.
The event handler use the connection resources and isert_conn_free
destroy them.
This commit fix multiple NULL dereference bugs.
Signed-off-by: Israel Rukshin <israelr@mellanox.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6877 d57e44dd-8a1f-0410-8b47-8ef2f437770f
A nop that is sent from the scst is treated as a fake request.
When a fake request is allocated we release it immediately,
so it's wrong to release it also on a completion error (isert_pdu_err).
This commit fix a NULL dereference bug when receiving completion with
error on this nop.
Signed-off-by: Israel Rukshin <israelr@mellanox.com>
Signed-off-by: Ariel Nahum <arieln@mellanox.com>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6876 d57e44dd-8a1f-0410-8b47-8ef2f437770f
1. Fix build of progs and mods targets, if iscsi_scst_itf_ver.h does not exist
2. Fix small race for parallel build of "all" target, when iscsi_scst_itf_ver.h
not yet built, when progs or mods target need it
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6861 d57e44dd-8a1f-0410-8b47-8ef2f437770f
RPM version comparison works correctly with numbers but not if the
revision starts with 'r'. Hence leave out the 'r'.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6855 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Additionally, surround complex values with parentheses, declare static
char arrays const and change C++ comments into C comments.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6849 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Avoid that stopping a large number of SRPT sessions causes a high
context switch frequency and hence a high CPU load.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6840 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Avoid that the iv pointer can become a dangling pointer for
vdisk_fileio devices. Freeing iv without resetting iv_count
makes it namely possible that iv will be used after the memory
that pointer points at has been freed.
For vdisk_blockio devices, call vdisk_on_free_cmd_params() to
free the iv pointer.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6838 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Move the code for LUN replacement from scst_sysfs.c into scst_lib.c.
This patch reduces code duplication by calling __scst_acg_del_lun()
from inside the LUN reassignment code. This patch does not change
any functionality.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6834 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This patch does not change any functionality but makes
__scst_process_luns_mgmt_store() easier to read.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6832 d57e44dd-8a1f-0410-8b47-8ef2f437770f
Those messages don't necessare mean any error. Some harmless race
conditions between the target driver and FW can lead to them as well.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6825 d57e44dd-8a1f-0410-8b47-8ef2f437770f