Commit Graph

8942 Commits

Author SHA1 Message Date
Gleb Chesnokov
86d5b218e4 scst_targ: Check prepare_to_wait_exclusive_head() return value
The prepare_to_wait_exclusive_head() function was modified in
commit d8894cbd11 ("scst.h: Refactor wait_event_locked() to enhance
usability and clarity"). It now returns an error if the current
interruptible thread has pending signals.

This patch introduces the scst_wait_for_cmd() helper function for the
scst_cmd_thread(). This new function handles the return value of the
prepare_to_wait_exclusive_head() appropriately.

This patch fixes the following Coverity complaint:

    CID 321410 (#1 of 1): Unchecked return value (CHECKED_RETURN)
    check_return: Calling prepare_to_wait_exclusive_head without
    checking return value.
2023-06-30 10:56:09 +03:00
Gleb Chesnokov
057224f669 scst_user: Simplify signal pending check
The scst_wait_event_interruptible_lock_irq() function now implicitly
checks for pending signals. Therefore, there is no need to check for
these signals explicitly. This patch replaces the explicit check with a
simple evaluation of the function's return value.

This patch doesn't change any functionality.
2023-06-30 10:56:09 +03:00
Gleb Chesnokov
6a925490fd scst: Confirm percpu refs has scheduled and switched to atomic
This patch replaces percpu_ref_kill() with percpu_ref_kill_and_confirm()
to guarantee safe usage of references in atomic mode immediately
afterwards.

This change ensures accurate checking of active commands following the
initial reference killing.

Reported-by: Lev Vainblat <lev@zadarastorage.com>
2023-06-28 19:31:45 +03:00
Gleb Chesnokov
bdf867ffd1 scst: Use scst_wait_event_...() with INTERRUPTIBLE sleep
This patch changes the processing threads to use INTERRUPTIBLE sleep
states in the scst_wait_event_...() functions. This aims to avoid
warnings from the hung task detection checker and to prevent
unnecessary load counting.

Fixes: d8894cbd11 ("scst.h: Refactor wait_event_locked() to enhance usability and clarity")
2023-06-27 17:11:13 +03:00
Gleb Chesnokov
1d6ab4aa72 nightly build: Update kernel versions
Another kernel versions update following the 6.4 release.
2023-06-27 10:31:33 +03:00
Gleb Chesnokov
be1574d80e scst_lib: Make __scst_ext_blocking_done() static
Since __scst_ext_blocking_done() is only called from inside scst_lib.c,
declare that function static.

This patch doesn't change any functionality.
2023-06-20 09:53:50 +03:00
Gleb Chesnokov
2c5c12c017 scst_lib: Enable scst_sync_ext_block_dev() to handle signals
This patch modifies scst_sync_ext_block_dev() to support INTERRUPTIBLE
waiting and handle signal-induced waiting cancellation. To achieve this,
the waitqueue head is moved from the stack and allocated with the blocker.
Additionally, reference counting and its management are added to the
blocker to handle memory freeing from multiple contexts.

Fixes: https://github.com/SCST-project/scst/issues/164
2023-06-20 09:53:50 +03:00
Gleb Chesnokov
b13b580d8b scst_lib: Split scst_ext_block_dev() for clarity and easier maintenance
This patch divides the scst_ext_block_dev() function into two separate
functions to improve code readability and simplify maintenance:

1. scst_sync_ext_block_dev() - This function is for synchronous blocking
   and serves as the equivalent of calling the old scst_ext_block_dev()
   function with the SCST_EXT_BLOCK_SYNC flag.

2. scst_ext_block_dev() - This function is for asynchronous blocking.

Additionally, the patch introduces the helper function
scst_dev_ext_block() to reduce code duplication between the
scst_sync_ext_block_dev() and scst_ext_block_dev() functions.

This patch doesn't change any functionality.
2023-06-20 09:53:50 +03:00
Gleb Chesnokov
d8894cbd11 scst.h: Refactor wait_event_locked() to enhance usability and clarity
1. Set the default process state to TASK_UNINTERRUPTIBLE during sleep.
   This change is made because our current code does not check whether a
   process was interrupted by a signal.

2. Prefix all SCST wait_event-related macros with 'scst_'. This helps to
   distinguish SCST-specific macros from those provided by the Linux
   kernel itself.

3. Add the capability to return an error code when a process in a
   non-TASK_UNINTERRUPTIBLE state is interrupted by a signal.

4. Divide the wait_event_locked function based on each lock type,
   resulting in the following new functions: scst_wait_event_lock(),
   scst_wait_event_lock_bh(), and scst_wait_event_lock_irq().
2023-06-20 09:53:50 +03:00
Gleb Chesnokov
334d29c96a scst.h: Unify names in prepare_to_wait_exclusive_head()
Use the standardized version of the name for wait_queue_head and
wait_queue_entry variables.

This patch doesn't change any functionality.
2023-06-20 09:53:50 +03:00
Gleb Chesnokov
7881162b9b scst: Unbreak the non-DLM build
Fix the following compiler error:

    ERROR: modpost: "scst_dlm_cluster_name" [...] undefined!

The error occurs because the declaration of scst_dlm_cluster_name is
located in the scst_dlm.c file, but it's used in the scst_sysfs.c file.
As a result, when building without DLM, this variable lacks a declaration.

To resolve this, the declaration is moved to the scst_main.c file, and the
variable scst_dlm_cluster_name is renamed to scst_cluster_name.

Fixes: 00f31004ab ("scst_sysfs: Add support for cluster_name")
2023-06-16 13:35:51 +03:00
Gleb Chesnokov
a6e0967054 scst/src/Makefile: Fix depmod warnings during installation process
This patch fixes the following warnings:

  /lib/.../scst_cdrom.ko needs unknown symbol scst_obtain_device_parameters
  /lib/.../scst_cdrom.ko needs unknown symbol scst_unregister_dev_driver
  ...

These warnings were caused by an incorrect module installation order:
the SCST module was being installed after the device handler modules
on which they depend. This patch rectifies the issue by altering the
order in which the modules are installed.

Additionally, this patch fixes the missing signatures for the device
handler modules.
2023-06-14 16:49:36 +03:00
Gleb Chesnokov
6c2771baef Makefile: Specify the installation directory for SCST modules explicitly
This patch fixes the installation process for Linux kernels where the
default value of INSTALL_MOD_DIR differs from `extra`.

For instance, it unbreaks `make rpm` against Fedora's kernels, where
INSTALL_MOD_DIR is set to `updates`.
2023-06-14 16:49:36 +03:00
Gleb Chesnokov
85e8086a7e Makefile: Implement several improvements to SCST Makefiles
1. Correct a typo, changing `make release` to `make 2release`.
2. Add information about package-related targets to the help section.
3. Remove `dev_handler` directory during the uninstall process.
4. Eliminate the non-existent `tgt` target from the PHONY targets.
5. Introduce SCST_MOD_DIR and SCST_DH_MOD_DIR as helper variables.
2023-06-14 16:49:36 +03:00
Gleb Chesnokov
3b0ab93c93 scst/include/backport.h: Unbreak the RHEL 9.3 build
Fixes: https://github.com/SCST-project/scst/issues/167
2023-06-13 17:49:50 +03:00
Gleb Chesnokov
1756a54367 scst.spec.in, scst-dkms.spec.in: Unbreak the CentOS Stream 9 build
Fixes: https://github.com/SCST-project/scst/issues/167
2023-06-09 15:11:18 +03:00
Gleb Chesnokov
e2a6774a2e scstadmin.spec: Replace custom Requires line with package names
The scstadmin.spec.in file contained a custom Requires line that
generated dependencies based on the full paths of the killall and rm
commands. This approach is unconventional and could cause issues with
dependency resolution.

This patch replaces the custom Requires line with the package names
providing the required commands, namely 'psmisc' for killall and
'coreutils' for rm. This change ensures proper dependency resolution
and adheres to recommended practices for specifying dependencies in
spec files.

Fixes: https://github.com/SCST-project/scst/issues/152
2023-06-05 13:36:46 +03:00
Gleb Chesnokov
1a4ecab818 qla2x00t-32gbit: Fix NULL pointer dereference in target mode
When target mode is enabled, the pci_irq_get_affinity() function may return
a NULL value in qla_mapq_init_qp_cpu_map() due to the qla24xx_enable_msix()
code that handles IRQ settings for target mode. This leads to a crash due
to a NULL pointer dereference.

This patch fixes the issue by adding a check for the NULL value returned by
pci_irq_get_affinity() and introducing a 'cpu_mapped' boolean flag to the
qla_qpair structure, ensuring that the qpair's CPU affinity is updated when
it has not been mapped to a CPU.

Fixes: 1d201c81d4cc ("scsi: qla2xxx: Select qpair depending on which CPU post_cmd() gets called")
Signed-off-by: Gleb Chesnokov <gleb.chesnokov@scst.dev>
Link: https://lore.kernel.org/r/56b416f2-4e0f-b6cf-d6d5-b7c372e3c6a2@scst.dev
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
[ commit d54820b22e40 upstream ]

Fixes: https://github.com/SCST-project/scst/issues/156
2023-06-05 13:35:03 +03:00
Gleb Chesnokov
596800ce2d qla2x00t-32gbit: Backport to older kernel versions
Backport the change from a previous commit to kernel versions prior to
v6.0, where commit f26e58bf6f54 ("PCI/AER: Enable error reporting when
AER is native") hasn't been introduced.
2023-06-05 13:35:03 +03:00
Gleb Chesnokov
7d1afe8a99 qla2x00t-32gbit: Drop redundant pci_enable_pcie_error_reporting()
pci_enable_pcie_error_reporting() enables the device to send ERR_*
Messages.  Since commit f26e58bf6f54 ("PCI/AER: Enable error reporting when
AER is native"), the PCI core does this for all devices during enumeration,
so the driver doesn't need to do it itself.

Remove the redundant pci_enable_pcie_error_reporting() call from the
driver.  Also remove the corresponding pci_disable_pcie_error_reporting()
from the driver .remove() path.

Note that this only controls ERR_* Messages from the device.  An ERR_*
Message may cause the Root Port to generate an interrupt, depending on the
AER Root Error Command register managed by the AER service driver.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://lore.kernel.org/r/20230307182842.870378-10-helgaas@kernel.org
Cc: Nilesh Javali <njavali@marvell.com>
Cc: GR-QLogic-Storage-Upstream@marvell.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
[ commit c5c440bbff86 upstream ]
2023-06-05 13:35:03 +03:00
Gleb Chesnokov
68461f5876 scst: Remove support for RHEL5/6
The SCST has dropped support for RHEL5/6 since v3.6.
2023-05-10 13:24:47 +03:00
Brian Meagher
92db6a9fc5 scst_pres,scst_dlm: Fix broken UNIT ATTENTION for remote PR registrants
Previously, when scst_pr_send_ua_reg attempted to deliver a UNIT ATTENTION
to a registrant that was on another node in a dlm-based HA cluster, the
unit attention was dropped.

Rectify by adding a pr_reg_queue_rem_ua function to struct scst_cl_ops and
calling it from scst_pr_send_ua_reg.

Each registrant will maintain an incoming 'queue' of unit attentions by
adding next_rem_ua_idx to the registrant data maintained in the DLM.  This
will tell the other nodes which PR_REG_UA_LOCK lock to create in the
lockspace in order to 'send' a unit attention to the registrant.

Further, each node will also maintain two lists (pending and sent) for the
outgoing unit attentions from this node to a registrant.  When the
recipient has read all the sent unit attentions (and cleared
next_rem_ua_idx), then the sent list may be cleared.
2023-05-10 10:31:51 +03:00
Brian Meagher
e34a4e0975 scsi-scstd: Check initiator name provided during login
The iSCSI specification has rules wrt what constitutes  a valid initiator
name.  Perform some checks and reject LOGINs with an invalid initiator
name.
2023-05-10 10:09:18 +03:00
Gleb Chesnokov
3dad1e957d scst: Unbreak the build for kernel versions <= 6.3
The previous series of patches introduced the use of a const pointer to
scsi_host_template. However, scsi_host_alloc() uses a non-const pointer
prior to kernel version 6.4, causing the build to throw the following
error:

    passing argument 1 of ‘scsi_host_alloc’ discards ‘const’
    qualifier from pointer target type

Hence, cast away the constness to resolve the error.
2023-05-02 23:14:06 +03:00
Gleb Chesnokov
15229d00cc github: Enhance checkpatch_pull error handling
Add an error variable to track errors during the loop in
checkpatch_pull.yml, allowing the workflow to run checkpatch for all
commits before exiting with the appropriate status.

Additionally, add COMMIT_LOG_USE_LINK to the ignore list for both
pull and push workflows
2023-04-28 16:05:09 +03:00
Gleb Chesnokov
33dedb2946 scst_local: Declare SCSI host template const
Make it explicit that the SCSI host template is not modified.
2023-04-28 15:22:58 +03:00
Gleb Chesnokov
c0aea55c52 qla2x00t: Declare SCSI host template const
Make it explicit that the SCSI host template is not modified.
2023-04-28 15:22:58 +03:00
Gleb Chesnokov
cd58d6326b qla2x00t-32gbit: Declare SCSI host template const
Make it explicit that the SCSI host template is not modified.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/r/20230322195515.1267197-68-bvanassche@acm.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
[ commit 421c20b7668e upstream ]
2023-04-28 15:22:58 +03:00
Gleb Chesnokov
d9bdab5ad2 qla2x00t-32gbit: Refer directly to the qla2xxx_driver_template
Access the qla2xxx_driver_template data structure directly instead of via
the host pointer. This patch prepares for declaring the 'hostt' pointer
const.

Cc: Nilesh Javali <njavali@marvell.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Link: https://lore.kernel.org/r/20230322195515.1267197-2-bvanassche@acm.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
[ commit a07be936d923 upstream ]
2023-04-28 15:22:58 +03:00
Gleb Chesnokov
faac0a1964 scst: Port to Linux kernel v6.4
Support for the following driver core changes in the Linux kernel v6.4:
- 1aaba11da9aa ("driver core: class: remove module * from class_create()")
- 2243acd50ac4 ("driver core: class: remove struct class_interface * from callbacks")
2023-04-28 15:22:58 +03:00
Gleb Chesnokov
cf94272cea scst: Remove scst_module.c file
I haven't been able to find any sign of this file being used since the
initial commit, so remove this dead code.
2023-04-28 15:22:58 +03:00
Gleb Chesnokov
a3d55ab7bd nightly build: Update kernel versions
Another kernel versions update following the 6.3 release.
2023-04-28 10:44:56 +03:00
Gleb Chesnokov
bef30fd6d0 scstadmin.spec: Fix RPM build errors
This patch fixes RPM build errors caused by incorrect file paths:

  RPM build errors:
    File must begin with "/": %{perl_vendorlib}/SCST
    File must begin with "/": %{perl_vendorarch}/auto/SCST_SCST

For some reasons, the perl_vendorlib and perl_vendorarch variables may
not be defined by default on newer RHEL systems.

Therefore, assign the variables explicitly to avoid these errors.
2023-04-24 17:53:34 +03:00
Brian Meagher
c326e96886 scst_lib,scst_sysfs: Add aen_disabled setting
Add a setting to scst_tgt that can prevent scst_gen_aen_or_ua from
generating an AEN, even if the underlying transport is capable of
transmitting them.  It will instead generate a UA.
2023-04-17 20:31:58 +03:00
Gleb Chesnokov
33b8323a81 scst_lib: Avoid holding scst_mutex during sess_tgt_dev_list access
In the previous commit, we introduced the use of RCU protection when
accessing sess_tgt_dev_list in scst_get_max_lun_commands().

As a result, we can now drop the use of scst_mutex when accessing the
list.
2023-04-17 17:16:42 +03:00
Gleb Chesnokov
c9198bb027 scst: Use RCU read lock when accessing sess_tgt_dev_list
We must always protect sess_tgt_dev_list during access and
modification.

There are two mechanisms for that:

- tgt_dev_list_mutex for list modifications.
- RCU for read-only list accesses.

Currently, the codebase doesn't consistently apply protection when
accessing the list. Fix this by adding RCU protection.

See also commit 3e64094b0c ("scst_sysfs: Do not suspend I/O for LUN
management").
2023-04-17 17:16:42 +03:00
Gleb Chesnokov
6ff72c8153 qla2x00t-32gbit: Fix memory leak in qla2x00_probe_one()
There is a memory leak reported by kmemleak:

  unreferenced object 0xffffc900003f0000 (size 12288):
    comm "modprobe", pid 19117, jiffies 4299751452 (age 42490.264s)
    hex dump (first 32 bytes):
      00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
      00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    backtrace:
      [<00000000629261a8>] __vmalloc_node_range+0xe56/0x1110
      [<0000000001906886>] __vmalloc_node+0xbd/0x150
      [<000000005bb4dc34>] vmalloc+0x25/0x30
      [<00000000a2dc1194>] qla2x00_create_host+0x7a0/0xe30 [qla2xxx]
      [<0000000062b14b47>] qla2x00_probe_one+0x2eb8/0xd160 [qla2xxx]
      [<00000000641ccc04>] local_pci_probe+0xeb/0x1a0

The root cause is traced to an error-handling path in qla2x00_probe_one()
when the adapter "base_vha" initialize failed. The fab_scan_rp "scan.l" is
used to record the port information and it is allocated in
qla2x00_create_host(). However, it is not released in the error handling
path "probe_failed".

Fix this by freeing the memory of "scan.l" when an error occurs in the
adapter initialization process.

Fixes: a4239945b8ad ("scsi: qla2xxx: Add switch command to simplify fabric discovery")
Signed-off-by: Li Zetao <lizetao1@huawei.com>
Link: https://lore.kernel.org/r/20230325110004.363898-1-lizetao1@huawei.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
[ commit 85ade4010e13 upstream ]
2023-04-12 11:08:39 +03:00
Gleb Chesnokov
81a959e68e README.md: Add SCST logo and github downloads badge
Enhance the project's README and provide an easy way to track the total
number of downloads.
2023-04-11 11:52:35 +03:00
Gleb Chesnokov
1376ad014d github: Add a GitHub action to run checkpatch upon pull request
Add a new GitHub Actions workflow, checkpatch_pull.yml, which runs
checkpatch.pl for each commit in a pull request targeting the master
branch.

This change ensures proper checkpatch validation for both push
and pull request events.
2023-04-11 11:52:35 +03:00
Gleb Chesnokov
87681c0d9a scst: Unbreak the RHEL 9.2 build
See also PR https://github.com/SCST-project/scst/pull/145.
2023-04-06 13:02:25 +03:00
Gleb Chesnokov
6f9a595f24 scst/include/backport.h: Fix the RHEL 9.0 build
Commit 9be09fd68b ("scst/include/backport.h: Fix building on
RHEL 8.8") fixed the build for RHEL 8.8, but at the same time, it
broke the build for RHEL 9.0.
2023-04-06 13:02:25 +03:00
Gleb Chesnokov
4fdb5273b6 github/checkpatch.yml: Simplify script
Simplify the script by removing an unnecessary call to `echo`.
2023-04-06 13:02:25 +03:00
Gleb Chesnokov
0717a72052 github: Add a GitHub action to run checkpatch upon push
Introduce a new GitHub action that automatically runs the
checkpatch.pl script upon each push to the repository.
2023-04-05 14:54:49 +03:00
Gleb Chesnokov
e5b936f10b github: Add a job name for the mail notification action
Enhance the mail notification GitHub action by including the commit
message in the job name.
2023-04-05 14:54:49 +03:00
Gleb Chesnokov
634bd00cc0 github: Fix deprecated set-output commands
set-output is being deprecated:

"Starting 1st June 2023 workflows using save-state or set-output
commands via stdout will fail with an error."

So fix this by using the GITHUB_OUTPUT environment files instead.
2023-04-05 12:09:53 +03:00
Gleb Chesnokov
22b03d1c6e INSTALL.md: Fix a checkpatch complaint about whitespace
This patch fixes the following checkpatch warnings:

    ERROR:TRAILING_WHITESPACE: trailing whitespace.
2023-04-04 11:47:44 +03:00
Gleb Chesnokov
70dfb06c40 scst: Fix a checkpatch complaint about whitespace
This patch fixes the following checkpatch warnings:

    WARNING:SPACE_BEFORE_TAB: please, no space before tabs.
2023-04-04 11:47:44 +03:00
Robert Blackhart
9be09fd68b scst/include/backport.h: Fix building on RHEL 8.8
This fixes a compilation issue with RHEL 8.8 in scst/include/backport.h.
This is the same issue as was seen for RHEL 8.7 in #77
2023-04-03 14:15:55 +03:00
Gleb Chesnokov
4e8ec64959 scst_vdisk: Introduce the function vdev_set_t10_dev_id()
This patch reduces code duplication.

This patch does not change any functionality.
2023-03-31 18:54:42 +03:00
Gleb Chesnokov
db581fc016 qla2x00t-32gbit: Synchronize the IOCB count to be in order
A system hang was observed with the following call trace:

BUG: kernel NULL pointer dereference, address: 0000000000000000
PGD 0 P4D 0
Oops: 0000 [#1] PREEMPT SMP NOPTI
CPU: 15 PID: 86747 Comm: nvme Kdump: loaded Not tainted 6.2.0+ #1
Hardware name: Dell Inc. PowerEdge R6515/04F3CJ, BIOS 2.7.3 03/31/2022
RIP: 0010:__wake_up_common+0x55/0x190
Code: 41 f6 01 04 0f 85 b2 00 00 00 48 8b 43 08 4c 8d
      40 e8 48 8d 43 08 48 89 04 24 48 89 c6\
      49 8d 40 18 48 39 c6 0f 84 e9 00 00 00 <49> 8b 40 18 89 6c 24 14 31
      ed 4c 8d 60 e8 41 8b 18 f6 c3 04 75 5d
RSP: 0018:ffffb05a82afbba0 EFLAGS: 00010082
RAX: 0000000000000000 RBX: ffff8f9b83a00018 RCX: 0000000000000000
RDX: 0000000000000001 RSI: ffff8f9b83a00020 RDI: ffff8f9b83a00018
RBP: 0000000000000001 R08: ffffffffffffffe8 R09: ffffb05a82afbbf8
R10: 70735f7472617473 R11: 5f30307832616c71 R12: 0000000000000001
R13: 0000000000000003 R14: 0000000000000000 R15: 0000000000000000
FS:  00007f815cf4c740(0000) GS:ffff8f9eeed80000(0000)
	knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 000000010633a000 CR4: 0000000000350ee0
Call Trace:
    <TASK>
    __wake_up_common_lock+0x83/0xd0
    qla_nvme_ls_req+0x21b/0x2b0 [qla2xxx]
    __nvme_fc_send_ls_req+0x1b5/0x350 [nvme_fc]
    nvme_fc_xmt_disconnect_assoc+0xca/0x110 [nvme_fc]
    nvme_fc_delete_association+0x1bf/0x220 [nvme_fc]
    ? nvme_remove_namespaces+0x9f/0x140 [nvme_core]
    nvme_do_delete_ctrl+0x5b/0xa0 [nvme_core]
    nvme_sysfs_delete+0x5f/0x70 [nvme_core]
    kernfs_fop_write_iter+0x12b/0x1c0
    vfs_write+0x2a3/0x3b0
    ksys_write+0x5f/0xe0
    do_syscall_64+0x5c/0x90
    ? syscall_exit_work+0x103/0x130
    ? syscall_exit_to_user_mode+0x12/0x30
    ? do_syscall_64+0x69/0x90
    ? exit_to_user_mode_loop+0xd0/0x130
    ? exit_to_user_mode_prepare+0xec/0x100
    ? syscall_exit_to_user_mode+0x12/0x30
    ? do_syscall_64+0x69/0x90
    ? syscall_exit_to_user_mode+0x12/0x30
    ? do_syscall_64+0x69/0x90
    entry_SYSCALL_64_after_hwframe+0x72/0xdc
    RIP: 0033:0x7f815cd3eb97

The IOCB counts are out of order and that would block any commands from
going out and subsequently hang the system. Synchronize the IOCB count to
be in correct order.

Fixes: 5f63a163ed2f ("scsi: qla2xxx: Fix exchange oversubscription for management commands")
Cc: stable@vger.kernel.org
Signed-off-by: Quinn Tran <qutran@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Link: https://lore.kernel.org/r/20230313043711.13500-3-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Reviewed-by: John Meneghini <jmeneghi@redhat.com>
Tested-by: Lin Li <lilin@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
[ commit d3affdeb400f upstream ]
2023-03-31 18:10:04 +03:00