Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ba2f9771 authored by Neal Liu's avatar Neal Liu Committed by Matthias Maennich
Browse files

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: default avatarNeal Liu <neal.liu@mediatek.com>
Change-Id: Idb40e2c2356621398e06944f7cb9b8bc5ef1d92a
parent e17d9fc5
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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
}