|
@@ -3517,6 +3517,11 @@ static noinline int do_init_module(struct module *mod)
|
|
* walking this with preempt disabled. In all the failure paths, we
|
|
* walking this with preempt disabled. In all the failure paths, we
|
|
* call synchronize_sched(), but we don't want to slow down the success
|
|
* call synchronize_sched(), but we don't want to slow down the success
|
|
* path, so use actual RCU here.
|
|
* path, so use actual RCU here.
|
|
|
|
+ * Note that module_alloc() on most architectures creates W+X page
|
|
|
|
+ * mappings which won't be cleaned up until do_free_init() runs. Any
|
|
|
|
+ * code such as mark_rodata_ro() which depends on those mappings to
|
|
|
|
+ * be cleaned up needs to sync with the queued work - ie
|
|
|
|
+ * rcu_barrier_sched()
|
|
*/
|
|
*/
|
|
call_rcu_sched(&freeinit->rcu, do_free_init);
|
|
call_rcu_sched(&freeinit->rcu, do_free_init);
|
|
mutex_unlock(&module_mutex);
|
|
mutex_unlock(&module_mutex);
|