summaryrefslogtreecommitdiffstats
path: root/kernel/module.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/module.c')
-rw-r--r--kernel/module.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/module.c b/kernel/module.c
index ce8066b88178..c9bea7f2b43e 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -3517,6 +3517,11 @@ static noinline int do_init_module(struct module *mod)
3517 * walking this with preempt disabled. In all the failure paths, we 3517 * walking this with preempt disabled. In all the failure paths, we
3518 * call synchronize_sched(), but we don't want to slow down the success 3518 * call synchronize_sched(), but we don't want to slow down the success
3519 * path, so use actual RCU here. 3519 * path, so use actual RCU here.
3520 * Note that module_alloc() on most architectures creates W+X page
3521 * mappings which won't be cleaned up until do_free_init() runs. Any
3522 * code such as mark_rodata_ro() which depends on those mappings to
3523 * be cleaned up needs to sync with the queued work - ie
3524 * rcu_barrier_sched()
3520 */ 3525 */
3521 call_rcu_sched(&freeinit->rcu, do_free_init); 3526 call_rcu_sched(&freeinit->rcu, do_free_init);
3522 mutex_unlock(&module_mutex); 3527 mutex_unlock(&module_mutex);