projects
/
linux
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2e35b43
)
scsi: ipr: Replace 1-element arrays with flexible arrays
author
Kees Cook
<kees@kernel.org>
Thu, 11 Jul 2024 18:07:06 +0000
(11:07 -0700)
committer
Martin K. Petersen
<martin.petersen@oracle.com>
Sat, 3 Aug 2024 01:29:51 +0000
(21:29 -0400)
Replace the deprecated[1] use of a 1-element arrays in struct
ipr_hostrcb_fabric_desc and struct ipr_hostrcb64_fabric_desc with modern
flexible arrays.
No binary differences are present after this conversion.
Link:
https://github.com/KSPP/linux/issues/79
Signed-off-by: Kees Cook <kees@kernel.org>
Link:
https://lore.kernel.org/r/20240711180702.work.536-kees@kernel.org
Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/ipr.h
patch
|
blob
|
history
diff --git
a/drivers/scsi/ipr.h
b/drivers/scsi/ipr.h
index c77d6ca1a2105d56ec82c31dc063f9df724b418d..b2b643c6dbbe68251628512ce8c32ecc80a411df 100644
(file)
--- a/
drivers/scsi/ipr.h
+++ b/
drivers/scsi/ipr.h
@@
-1030,7
+1030,7
@@
struct ipr_hostrcb_fabric_desc {
#define IPR_PATH_FAILED 0x03
__be16 num_entries;
- struct ipr_hostrcb_config_element elem[
1
];
+ struct ipr_hostrcb_config_element elem[];
}__attribute__((packed, aligned (4)));
struct ipr_hostrcb64_fabric_desc {
@@
-1044,7
+1044,7
@@
struct ipr_hostrcb64_fabric_desc {
u8 res_path[8];
u8 reserved3[6];
__be16 num_entries;
- struct ipr_hostrcb64_config_element elem[
1
];
+ struct ipr_hostrcb64_config_element elem[];
}__attribute__((packed, aligned (8)));
#define for_each_hrrq(hrrq, ioa_cfg) \