The patch titled Subject: modules: wait do_free_init correctly has been added to the -mm mm-unstable branch. Its filename is modules-wait-do_free_init-correctly-v3.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/modules-wait-do_free_init-correctly-v3.patch This patch will later appear in the mm-unstable branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next via the mm-everything branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there every 2-3 working days ------------------------------------------------------ From: Changbin Du <changbin.du@xxxxxxxxxx> Subject: modules: wait do_free_init correctly Date: Sat, 17 Feb 2024 16:18:10 +0800 amend comment in do_init_module() and update commit msg Link: https://lkml.kernel.org/r/20240217081810.4155871-1-changbin.du@xxxxxxxxxx Fixes: 1a7b7d922081 ("modules: Use vmalloc special flag") Signed-off-by: Changbin Du <changbin.du@xxxxxxxxxx> Tested-by: Eric Chanudet <echanude@xxxxxxxxxx> Cc: Xiaoyi Su <suxiaoyi@xxxxxxxxxx> Cc: Luis Chamberlain <mcgrof@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- kernel/module/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/kernel/module/main.c~modules-wait-do_free_init-correctly-v3 +++ a/kernel/module/main.c @@ -2598,8 +2598,8 @@ static noinline int do_init_module(struc * 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() + * be cleaned up needs to sync with the queued work by invoking + * flush_module_init_free_work(). */ if (llist_add(&freeinit->node, &init_free_list)) schedule_work(&init_free_wq); _ Patches currently in -mm which might be from changbin.du@xxxxxxxxxx are modules-wait-do_free_init-correctly.patch modules-wait-do_free_init-correctly-v3.patch