Commit 4f48795b authored by Masami Hiramatsu's avatar Masami Hiramatsu Committed by Rusty Russell
Browse files

module: Wait for RCU synchronizing before releasing a module

Wait for RCU synchronizing on failure path of module loading
before releasing struct module, because the memory of mod->list
can still be accessed by list walkers (e.g. kallsyms).

Signed-off-by: default avatarMasami Hiramatsu <>
Signed-off-by: default avatarRusty Russell <>
parent 0df1f248
......@@ -3326,6 +3326,8 @@ static int load_module(struct load_info *info, const char __user *uargs,
/* Unlink carefully: kallsyms could be walking list. */
/* Wait for RCU synchronizing before releasing mod->list. */
module_deallocate(mod, info);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment