diff options
| author | Chandrakanth Patil <chandrakanth.patil@broadcom.com> | 2026-08-26 02:33:57 +0530 |
|---|---|---|
| committer | Martin K. Petersen (Oracle) <mkp@kernel.org> | 2026-09-09 22:08:15 -0400 |
| commit | 37e7d274272bc5e545e2d5f9261afa7f33f1cf49 (patch) | |
| tree | 2a1ab1d04aed9d65c55ef27247cfbe08d7cb8d1f | |
| parent | 9fac4cbd66d852958e8a8d0952eb57f8554ce83b (diff) | |
| download | linux-next-37e7d274272bc5e545e2d5f9261afa7f33f1cf49.tar.gz linux-next-37e7d274272bc5e545e2d5f9261afa7f33f1cf49.zip | |
scsi: mpi3mr: Fix I/O block counter leak on admin request post failure
The per device I/O block counter is raised before a task management request
is posted and only lowered once the request completes. If the post itself
fails the counter stays raised and I/O to that device remains blocked.
Lower it on the failure path as well.
Fixes: 506bc1a0d6ba ("scsi: mpi3mr: Add support for MPT commands")
Signed-off-by: Chandrakanth Patil <chandrakanth.patil@broadcom.com>
Link: https://patch.msgid.link/20260825210411.301535-4-chandrakanth.patil@broadcom.com
Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
| -rw-r--r-- | drivers/scsi/mpi3mr/mpi3mr_app.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/scsi/mpi3mr/mpi3mr_app.c b/drivers/scsi/mpi3mr/mpi3mr_app.c index 1cd1c38dcd56..a4fe10a05cb3 100644 --- a/drivers/scsi/mpi3mr/mpi3mr_app.c +++ b/drivers/scsi/mpi3mr/mpi3mr_app.c @@ -2782,6 +2782,8 @@ static long mpi3mr_bsg_process_mpt_cmds(struct bsg_job *job) dprint_bsg_err(mrioc, "%s: posting bsg request is failed\n", __func__); rval = -EAGAIN; + if (block_io && stgt_priv) + atomic_dec(&stgt_priv->block_io); goto out_unlock; } wait_for_completion_timeout(&mrioc->bsg_cmds.done, |
