| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
When iscsid makes syscalls that lead to memory allocations the kernel
might use GFP_KERNEL. This can lead to pages being written to iscsi
disks managed by iscsid. If we are doing a syscall to try and reconnect
the session the disk is accessed through then we could deadlock.
When in the iscsi layer we can select our GFP flags but when making
syscalls to the network layer we have to set PR_SET_IO_FLUSHER so we
use the correct GFP flags.
Signed-off-by: Mike Christie <michael.christie@oracle.com>
|
|\
| |
| | |
Support the "qede" CNA-card driver.
|
| |
| |
| |
| | |
The iscsi_offload command needs to recognize the "qede" driver.
|
|\ \
| | |
| | | |
iscsistart: fix null pointer deref before exit
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fixes regression caused by "open-iscsi: Clean user_param list when
process exit" Which is a shame, as not freeing a memory at process exit
doesn't really hurt anything.
Same change as "Fix iscsiadm segfault when exiting" applied to iscsiadm.
Fixes: b532ad67d495d42026165a26515c645995d23f18
Signed-off-by: Chris Leech <cleech@redhat.com>
|
|\ \
| |/
|/| |
Set default 'startup' to 'onboot' for FW nodes
|
|/
|
|
|
|
|
|
|
|
| |
When "iscsiadm -m discovery -t fw" is ran, nodes are
created/updated in the node DB for each firmware target
found, but the 'startup' mode values are left as 'manual',
when in fact firmware nodes are treated as if this
value is 'onboot'. So to keep the node DB in sync with
behavior, set these to 'onboot' by default. This
should *not* effect any other functionality.
|
|\
| |
| | |
Add iscsiadm "no wait" option for firmware login.
|
|/
|
|
|
| |
In addition, update the iscsiadm help message, and the
iscsiadm man page.
|
|\
| |
| | |
Check ISCSI_ERR_ISCSID_NOTCONN in iscsistart login
|
|/
|
| |
In login_session() function, we need to check for error ISCSI_ERR_ISCSID_NOTCONN also. When the login command is sent to the iscsid using iscsid_exec_req(), it will try to connect to iscsid using the function ipc_connect(). If there is an issue in iscsid or if we are not able to create the socket due to some reason, then the error ISCSI_ERR_ISCSID_NOTCONN is returned. We need to retry the login command by checking the error ISCSI_ERR_ISCSID_NOTCONN.
|
|\
| |
| | |
Log error message when auth debug status is set
|
|/
|
| |
Log the correct error message in /var/log/messages when the debug status is set when there is an authentication error. The change is made in check_security_stage_status() function. This issue was identified when one of the customer was trying to login to the iscsi target after configuring the mutual CHAP authentication. They set the same password for both side authentication. This is not allowed as per the code as it was returning AUTH_DBG_STATUS_PASSWD_IDENTICAL. The error logged in /var/log/messages was not obvious. This change will help to understand the correct error message so that required action can be taken.
|
| |
|
|\
| |
| | |
Iscsi sessions get
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
through iscsi_sessions_get()
Suppress the error message from iscsi_session_get when it's being called
through iscsi_sessions_get now that it's not being treated as an error.
There's no reason to be so alarmed the session being read in isn't
specified exactly.
Signed-off-by: Chris Leech <cleech@redhat.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When looping over all sessions with iscsi_sessions_get, it's possible to
race against sessions being destroyed and have the sysfs attribute files
be removed before they're read. Let's not treat this as an error, and
simply drop the session that failed to read from the list. I think it
makes sense to treat session that disapear while they're being read as
if they were already gone when the sessions directory was first scanned.
Apparently having iscsiadm exit with an error when trying to get a list
of sessions is a problem for OpenStack deployments.
Signed-off-by: Chris Leech <cleech@redhat.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The error message in iscsi_session_get [libopeniscsiusr/session.c:140]
when a session or connection path isn't found in sysfs was failing to
print the session ID, instead it printed the address of the static
string for the remainder of the message ("does not exists") due to an
extra comma.
Additionally change all occurances of "does not exists" to "does not
exist"
Signed-off-by: Chris Leech <cleech@redhat.com>
|
|\ \
| |/
|/| |
Enable iscsi.service asynchronous logins, cleanup services
|
|/
|
|
|
|
|
|
|
| |
Add the "-W" (no wait) flag to the iscsiadm login command in
iscsi.service, so that the service succeeds even if one or more
of the targets being logged on to is not available at startup
time.
Also, clean up the iscsi.service and iscsid.service files.
|
|\
| |
| | |
Avoid hardcoding pkg-config to fix cross build
|
|/
|
|
| |
Debian Bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=982307
|
|\
| |
| | |
Fix iscsistart login issue when target is delayed.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Earlier commit 9258c8eae046 changed the return value fron
iscsid_response() from ISCSI_ERR_ISCSID_NOTCONN to
ISCSI_ERR_SESSION_NOT_CONNECTED in the case where no iscsi response is
received when expected.
This effected the login code in iscsistart when the target is not
completely ready at iscsi login time. This commit updates iscsistart
to expect the new error code, but fixing this uncovered another issue,
causing iscsistart logins to continue to fail if the target returned its
login response too slowly.
This commit ups the timeout time for iscsistart logins from 1 second per
try to 10 seconds per try. This is perhaps excessive, and a shorter
delay would be more appropriate, but the retry/nanosleep logic in
iscsistart meant to retry the login in such cases seems problematic in
this case, since retrying the 2nd time returns "session already exists",
and most iscsistart clients aren't prepared for the command to return a
non-zero return value.
|
|\
| |
| | |
Wants=network-online.target in iscsi.service
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Setting After= without Requires= or Wants= is not enough to pull
network-online.target as a dependency.
Currently, if some other service requires network-online.target
then iscsi.service is started after network-online.target
If no any other services require network-online.target then
iscsi.service may be started before networking is working.
The latter leads to the following issues:
iscsiadm: Could not login to [iface: default, target: XXX, portal: XXX,3260].
iscsiadm: initiator reported error (4 - encountered connection failure)
Reference: https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/
|
|
|
|
|
|
|
|
|
|
| |
Commit b532ad67d495d added some cleanup code
to iscsiadm right before it exits, but it
used a list_for_each_entry() to iterate through
a list was being deleted, when it should use
list_for_each_entry_safe().
Fixes: b532ad67d495d
|
|\
| |
| | |
iscsid: Add NO_SYSTEMD to CFLAGS
|
|/
|
|
|
|
|
| |
When building with NO_SYSTEMD=1 set the -DNO_SYSTEMD CFLAG, otherwise
the iscsid build tries to include the systemd header and aborts:
iscsid.c:38:10: fatal error: systemd/sd-daemon.h: No such file or directory
|
|\
| |
| | |
Change mkdir permissions to 0770, adjust umask
|
| |
| |
| |
| |
| |
| |
| | |
- Change mkdir() permissions from 0660 to 0770 so that there
are not SELinux dac_override violations.
- Adjust the umask to preserve execute bit permission on directories
created in iscsid and iscsiadm.
|
|\ \
| | |
| | | |
Fix typo in util.py
|
|/ /
| |
| | |
Fix s/sttderr/stderr typo in line 179 of util.py
|
|\ \
| | |
| | | |
Fix 4 memory leak in source code
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Memory allocated by iscsi_context_new() would not be freed if
error occurred during parameters parser stage and goto free_ifaces
is used to jump to resource clean.
Since all resource clean is performed after verified, so change
all goto free_ifaces to goto out where handles resource better.
Signed-off-by: Wenchao Hao <haowenchao@huawei.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
If _iscsi_sids_get() gets 0 session, *session_count is 0, while
calloc(*session_count, ...) might return a valid pointer although
*session_count is 0.
The memory allocated by calloc() would be freed in
iscsi_session_free() where did not perform free operation
if session_count is zero.
So memory leak would occur if _iscsi_sids_get() gets 0 session,
this patch just goto out on if _iscsi_sids_get() gets 0 session to
avoid calloc() being called.
Signed-off-by: Wenchao Hao <haowenchao@huawei.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
If _scandir() gets 0 node, *node_count is 0, while
calloc(*node_count, ...) might return a valid pointer although
*node_count is 0.
The memory allocated by calloc() would be freed in
iscsi_nodes_free() where did not perform free operation
if node_count is zero.
So memory leak might occur if _scandir() get 0 node.
Signed-off-by: Wenchao Hao <haowenchao@huawei.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Three memory issues in this function:
1. did not verify return value of calloc(), strdup() or malloc();
2. memory leak of pointer tmp_value caused strsep()
tmp_value would change after strsep() and free(tmp_value) would
cause memory leak;
3. memory leak of pointer "found", the memory was allocated but did
not freed
Signed-off-by: Wenchao Hao <haowenchao@huawei.com>
|
|\ \ \
| | | |
| | | | |
Add etc/systemd/iscsi-init.service to SYSTEMDFILES Makefile variable
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
iscsi-init.service is not included in the SYSTEMDFILES Makefile variable,
causing it to be skipped when the install_systemd rule is executed. This causes
the iscsi systemd service to fail on a fresh install, as it requires the
iscsi-init service.
This commit adds etc/systemd/iscsi-init.service to the list of files in
SYSTEMDFILES to correct this issue.
|
|/ /
| |
| |
| |
| |
| | |
The daemon allowed both the no-pid-file option and specifying
a PID file to use, and honored which ever option was supplied
last. This commmit ensures non-conflicting options are supplied.
|
|\ \
| | |
| | | |
iscsiuio uIP input packet processing bounds checking fixes
|
| | | |
|
| | |
| | |
| | |
| | | |
CVE-2020-17437
|
| | |
| | |
| | |
| | | |
CVE-2020-13988
|
|/ /
| |
| |
| | |
CVE-2020-13987
|
|\ \
| | |
| | | |
fix several issues reported by a Coverity scan
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
calloc() is called because loop_devs() to allocate memory
which stored in array ofwdev. These memory should be freed
at the end.
Signed-off-by: Wenchao Hao <haowenchao@huawei.com>
Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
Signed-off-by: Wu Bo <wubo40@huawei.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
IFNAMSIZ is not used in this file. IFNAMSIZ is a macro defined in
net/if.h. Maybe this this macro is defined here to give it a self
defined value rather than system pre-defined at beginning, while
it seems the code reference the macro in this file is removed, so
here we can remove it.
Signed-off-by: Wenchao Hao <haowenchao@huawei.com>
Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
Signed-off-by: Wu Bo <wubo40@huawei.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
bootpath_val is allocated in find_file() and referenced if find_file()
excute successfully, while it was freed in find_file() and
dereferenced after find_file() if find_file() returns 1.
This patch remove free(bootpath_val) in find_file() and free
bootpath_val when it is used done.
Signed-off-by: Wenchao Hao <haowenchao@huawei.com>
Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
Signed-off-by: Wu Bo <wubo40@huawei.com>
|