diff options
author | Neal Liu <neal.liu@mediatek.com> | 2020-05-22 17:44:35 +0800 |
---|---|---|
committer | Sami Tolvanen <samitolvanen@google.com> | 2020-06-04 03:30:59 +0000 |
commit | 9cbc366785be60cc4e563b222aa3b8f577db675a (patch) | |
tree | 9034522ed98ca724ae16a9739a1ac6fa355b81cf | |
parent | a9ee8bba814d956404c12b1c2e2c24cf4b710f08 (diff) |
ANDROID: modules: fix lockprove warningASB-2020-06-05_4.14-stable
Need to disable preemption before using rcu_dereference_sched().
Bug: 157383682
Change-Id: I5f7c0a222bac35c5fa58cdd9f4cf71cb422a01cd
Signed-off-by: Neal Liu <neal.liu@mediatek.com>
-rw-r--r-- | kernel/module.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/module.c b/kernel/module.c index a43d6a370198..17b9c73c9046 100644 --- a/kernel/module.c +++ b/kernel/module.c @@ -4148,8 +4148,10 @@ int module_kallsyms_on_each_symbol(int (*fn)(void *, const char *, static void cfi_init(struct module *mod) { #ifdef CONFIG_CFI_CLANG + preempt_disable(); mod->cfi_check = (cfi_check_fn)mod_find_symname(mod, CFI_CHECK_FN_NAME); + preempt_enable(); cfi_module_add(mod, module_addr_min, module_addr_max); #endif } |