]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
efi: rci2: mark bin_attribute as __ro_after_init
authorThomas Weißschuh <linux@weissschuh.net>
Fri, 22 Nov 2024 10:31:15 +0000 (11:31 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Feb 2025 08:20:32 +0000 (09:20 +0100)
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>
Link: https://lore.kernel.org/r/20241122-sysfs-const-bin_attr-rci2-v1-1-3db1ec9aa203@weissschuh.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/firmware/efi/rci2-table.c

index 4fd45d6f69a4d8b3233b2e49dc91f0b734a338e9..c1bedd244817b2c53d6cfc4cc8b13f479ba3caa9 100644 (file)
@@ -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)
 {