From: <gregkh@linuxfoundation.org>
To: njavali@marvell.com, bhazarika@marvell.com,
himanshu.madhani@oracle.com, martin.petersen@oracle.com
Cc: <stable@vger.kernel.org>
Subject: FAILED: patch "[PATCH] scsi: qla2xxx: Array index may go out of bound" failed to apply to 4.14-stable tree
Date: Fri, 21 Jul 2023 16:42:41 +0200 [thread overview]
Message-ID: <2023072141-freezable-tactical-2c4a@gregkh> (raw)
The patch below does not apply to the 4.14-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable@vger.kernel.org>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-4.14.y
git checkout FETCH_HEAD
git cherry-pick -x d721b591b95cf3f290f8a7cbe90aa2ee0368388d
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<stable@vger.kernel.org>' --in-reply-to '2023072141-freezable-tactical-2c4a@gregkh' --subject-prefix 'PATCH 4.14.y' HEAD^..
Possible dependencies:
d721b591b95c ("scsi: qla2xxx: Array index may go out of bound")
250bd00923c7 ("scsi: qla2xxx: Fix inconsistent format argument type in qla_os.c")
a4239945b8ad ("scsi: qla2xxx: Add switch command to simplify fabric discovery")
9cd883f07a54 ("scsi: qla2xxx: Fix session cleanup for N2N")
82abdcaf3ede ("scsi: qla2xxx: Allow target mode to accept PRLI in dual mode")
11aea16ab3f5 ("scsi: qla2xxx: Add ability to send PRLO")
9b3e0f4d4147 ("scsi: qla2xxx: Move work element processing out of DPC thread")
f13515acdcb5 ("scsi: qla2xxx: Replace GPDB with async ADISC command")
2853192e154b ("scsi: qla2xxx: Use IOCB path to submit Control VP MBX command")
4005a995668b ("scsi: qla2xxx: Fix Relogin being triggered too fast")
5ef696aa9f3c ("scsi: qla2xxx: Relogin to target port on a cable swap")
414d9ff3f803 ("scsi: qla2xxx: Fix login state machine stuck at GPDB")
2d73ac6102d9 ("scsi: qla2xxx: Serialize GPNID for multiple RSCN")
25ad76b703d9 ("scsi: qla2xxx: Retry switch command on time out")
a084fd68e1d2 ("scsi: qla2xxx: Fix re-login for Nport Handle in use")
a01c77d2cbc4 ("scsi: qla2xxx: Move session delete to driver work queue")
2d57b5efda51 ("scsi: qla2xxx: Query FC4 type during RSCN processing")
edd05de19759 ("scsi: qla2xxx: Changes to support N2N logins")
c0c462c8a061 ("scsi: qla2xxx: Allow MBC_GET_PORT_DATABASE to query and save the port states")
08eb7f45de61 ("scsi: qla2xxx: Cocci spatch "pool_zalloc-simple"")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From d721b591b95cf3f290f8a7cbe90aa2ee0368388d Mon Sep 17 00:00:00 2001
From: Nilesh Javali <njavali@marvell.com>
Date: Wed, 7 Jun 2023 17:08:36 +0530
Subject: [PATCH] scsi: qla2xxx: Array index may go out of bound
Klocwork reports array 'vha->host_str' of size 16 may use index value(s)
16..19. Use snprintf() instead of sprintf().
Cc: stable@vger.kernel.org
Co-developed-by: Bikash Hazarika <bhazarika@marvell.com>
Signed-off-by: Bikash Hazarika <bhazarika@marvell.com>
Signed-off-by: Nilesh Javali <njavali@marvell.com>
Link: https://lore.kernel.org/r/20230607113843.37185-2-njavali@marvell.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
index bc89d3da8fd0..3bace9ea6288 100644
--- a/drivers/scsi/qla2xxx/qla_os.c
+++ b/drivers/scsi/qla2xxx/qla_os.c
@@ -5088,7 +5088,8 @@ struct scsi_qla_host *qla2x00_create_host(const struct scsi_host_template *sht,
}
INIT_DELAYED_WORK(&vha->scan.scan_work, qla_scan_work_fn);
- sprintf(vha->host_str, "%s_%lu", QLA2XXX_DRIVER_NAME, vha->host_no);
+ snprintf(vha->host_str, sizeof(vha->host_str), "%s_%lu",
+ QLA2XXX_DRIVER_NAME, vha->host_no);
ql_dbg(ql_dbg_init, vha, 0x0041,
"Allocated the host=%p hw=%p vha=%p dev_name=%s",
vha->host, vha->hw, vha,
reply other threads:[~2023-07-21 14:43 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2023072141-freezable-tactical-2c4a@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=bhazarika@marvell.com \
--cc=himanshu.madhani@oracle.com \
--cc=martin.petersen@oracle.com \
--cc=njavali@marvell.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox