]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
scsi: mpi3mr: Use scnprintf() instead of snprintf()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 13 Oct 2021 08:30:05 +0000 (11:30 +0300)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 20 May 2022 12:41:56 +0000 (14:41 +0200)
commit102a085cd73d8a2efac06cce50f14abca5ac1229
tree78d2a8d9f0acb70f93332ccb37a36cacb89b6b83
parent09f505ed2d5c2a4bd7798b9532ff275c66df43fc
scsi: mpi3mr: Use scnprintf() instead of snprintf()

BugLink: https://bugs.launchpad.net/bugs/1967116
I intended to move from snprintf() to scnprintf() in the previous patch but
I messed up and did not do that.  The result of my bug is that it this
function could trigger a WARN() if the buffer is too large.

Link: https://lore.kernel.org/r/20211013083005.GA8592@kili
Fixes: 76a4f7cc5973 ("scsi: mpi3mr: Clean up mpi3mr_print_ioc_info()")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit 30e99f05f8b19b8274f3666afb70c9cc686ec65c)
Signed-off-by: Jeff Lane <jeffrey.lane@canonical.com>
Acked-by: Tim Gardner <tim.gardner@canonical.com>
Acked-by: Paolo Pisati <paolo.pisati@canonical.com>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/scsi/mpi3mr/mpi3mr_fw.c