Skip to content

Commit e965efc

Browse files
t-8chgregkh
authored andcommitted
efi: rci2: mark bin_attribute as __ro_after_init
The attribute is only modified during __init phase. Protect it against accidental or intentional modifications afterwards. Signed-off-by: Thomas Weißschuh <[email protected]> Link: https://lore.kernel.org/r/20241122-sysfs-const-bin_attr-rci2-v1-1-3db1ec9aa203@weissschuh.net Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 5d0fbf5 commit e965efc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/firmware/efi/rci2-table.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ static u8 *rci2_base;
4040
static u32 rci2_table_len;
4141
unsigned long rci2_table_phys __ro_after_init = EFI_INVALID_TABLE_ADDR;
4242

43-
static BIN_ATTR_SIMPLE_ADMIN_RO(rci2);
43+
static __ro_after_init BIN_ATTR_SIMPLE_ADMIN_RO(rci2);
4444

4545
static u16 checksum(void)
4646
{

0 commit comments

Comments
 (0)