]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
debugobjects: Fix the compilation attributes of some global variables
authorZhen Lei <thunder.leizhen@huawei.com>
Wed, 4 Sep 2024 13:39:39 +0000 (21:39 +0800)
committerThomas Gleixner <tglx@linutronix.de>
Mon, 9 Sep 2024 14:40:25 +0000 (16:40 +0200)
commite4757c710ba27a1d499cf5941fc3950e9e542731
tree3715469b68480b1e7d17d05a1408a0e83879d7fe
parent431c1646e1f86b949fa3685efc50b660a364c2b6
debugobjects: Fix the compilation attributes of some global variables

1. Both debug_objects_pool_min_level and debug_objects_pool_size are
   read-only after initialization, change attribute '__read_mostly' to
   '__ro_after_init', and remove '__data_racy'.

2. Many global variables are read in the debug_stats_show() function, but
   didn't mask KCSAN's detection. Add '__data_racy' for them.

Suggested-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20240904133944.2124-2-thunder.leizhen@huawei.com
lib/debugobjects.c