Message ID | 20241122-sysfs-const-bin_attr-rci2-v1-1-3db1ec9aa203@weissschuh.net |
---|---|
State | New |
Headers | show |
Series | efi: rci2: mark bin_attribute as __ro_after_init | expand |
diff --git a/drivers/firmware/efi/rci2-table.c b/drivers/firmware/efi/rci2-table.c index 4fd45d6f69a4d8b3233b2e49dc91f0b734a338e9..c1bedd244817b2c53d6cfc4cc8b13f479ba3caa9 100644 --- a/drivers/firmware/efi/rci2-table.c +++ b/drivers/firmware/efi/rci2-table.c @@ -40,7 +40,7 @@ static u8 *rci2_base; static u32 rci2_table_len; unsigned long rci2_table_phys __ro_after_init = EFI_INVALID_TABLE_ADDR; -static BIN_ATTR_SIMPLE_ADMIN_RO(rci2); +static __ro_after_init BIN_ATTR_SIMPLE_ADMIN_RO(rci2); static u16 checksum(void) {
The attribute is only modified during __init phase. Protect it against accidental or intentional modifications afterwards. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> --- drivers/firmware/efi/rci2-table.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- base-commit: 28eb75e178d389d325f1666e422bc13bbbb9804c change-id: 20241122-sysfs-const-bin_attr-rci2-74cbb46f7ea7 Best regards,