module.h: Annotate mod_kallsyms with __rcu
authorMadhuparna Bhowmik <madhuparnabhowmik10@gmail.com>
Wed, 22 Jan 2020 17:04:47 +0000 (22:34 +0530)
committerJessica Yu <jeyu@kernel.org>
Thu, 23 Jan 2020 17:19:48 +0000 (18:19 +0100)
This patch fixes the following sparse errors:

kernel/module.c:3623:9: error: incompatible types in comparison expression
kernel/module.c:4060:41: error: incompatible types in comparison expression
kernel/module.c:4203:28: error: incompatible types in comparison expression
kernel/module.c:4225:41: error: incompatible types in comparison expression

Signed-off-by: Madhuparna Bhowmik <madhuparnabhowmik10@gmail.com>
Signed-off-by: Jessica Yu <jeyu@kernel.org>
include/linux/module.h

index bd165ba..dfdc886 100644 (file)
@@ -429,7 +429,7 @@ struct module {
 
 #ifdef CONFIG_KALLSYMS
        /* Protected by RCU and/or module_mutex: use rcu_dereference() */
-       struct mod_kallsyms *kallsyms;
+       struct mod_kallsyms __rcu *kallsyms;
        struct mod_kallsyms core_kallsyms;
 
        /* Section attributes */