scsi: aacraid: struct aac_ciss_phys_luns_resp: Replace 1-element array with flexible array

BugLink: https://bugs.launchpad.net/bugs/2078038

Replace the deprecated[1] use of a 1-element array in struct
aac_ciss_phys_luns_resp with a modern flexible array.

No binary differences are present after this conversion.

Link: https://github.com/KSPP/linux/issues/79 [1]
Signed-off-by: Kees Cook <kees@kernel.org>
Link: https://lore.kernel.org/r/20240711175055.work.928-kees@kernel.org
Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit 2e35b43bc9a82fde4e7aebe5d8331e1158374d5c)
Signed-off-by: Juerg Haefliger <juerg.haefliger@canonical.com>
Acked-by: Ivan Hu <ivan.hu@canonical.com>
Acked-by: Guoqing Jiang <guoqing.jiang@canonical.com>
Signed-off-by: Roxana Nicolescu <roxana.nicolescu@canonical.com>
This commit is contained in:
Kees Cook
2024-10-02 11:44:55 +02:00
committed by Mehmet Basaran
parent 1b0cb6bac3
commit 2e4a9dfbe5
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -1833,7 +1833,7 @@ static int aac_get_safw_ciss_luns(struct aac_dev *dev)
struct aac_ciss_phys_luns_resp *phys_luns;
datasize = sizeof(struct aac_ciss_phys_luns_resp) +
(AAC_MAX_TARGETS - 1) * sizeof(struct _ciss_lun);
AAC_MAX_TARGETS * sizeof(struct _ciss_lun);
phys_luns = kmalloc(datasize, GFP_KERNEL);
if (phys_luns == NULL)
goto out;
+1 -1
View File
@@ -322,7 +322,7 @@ struct aac_ciss_phys_luns_resp {
u8 level3[2];
u8 level2[2];
u8 node_ident[16]; /* phys. node identifier */
} lun[1]; /* List of phys. devices */
} lun[]; /* List of phys. devices */
};
/*