ANDROID: modules: fix suspicious rcu usage
Use rcu_read_lock_sched() & rcu_read_unlock_sched() to mark the beginning & end of a RCU-sched critical section instead. Bug: 171362096 Signed-off-by: Neal Liu <neal.liu@mediatek.com> Change-Id: Idb40e2c2356621398e06944f7cb9b8bc5ef1d92a
This commit is contained in:
committed by
Matthias Maennich
parent
e17d9fc531
commit
ba2f977129
@@ -4348,10 +4348,10 @@ int module_kallsyms_on_each_symbol(int (*fn)(void *, const char *,
|
||||
static void cfi_init(struct module *mod)
|
||||
{
|
||||
#ifdef CONFIG_CFI_CLANG
|
||||
rcu_read_lock();
|
||||
rcu_read_lock_sched();
|
||||
mod->cfi_check = (cfi_check_fn)find_kallsyms_symbol_value(mod,
|
||||
CFI_CHECK_FN_NAME);
|
||||
rcu_read_unlock();
|
||||
rcu_read_unlock_sched();
|
||||
cfi_module_add(mod, module_addr_min, module_addr_max);
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user