diff options
| author | Peter Zijlstra <peterz@infradead.org> | 2015-07-08 17:18:06 -0400 |
|---|---|---|
| committer | Rusty Russell <rusty@rustcorp.com.au> | 2015-07-08 17:27:12 -0400 |
| commit | 758556bdc1c8a8dffea0ea9f9df891878cc2468c (patch) | |
| tree | 215394779cca168f57e48fda3cf8c91f451a42c8 | |
| parent | 45820c294fe1b1a9df495d57f40585ef2d069a39 (diff) | |
module: Fix load_module() error path
The load_module() error path frees a module but forgot to take it out
of the mod_tree, leaving a dangling entry in the tree, causing havoc.
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Reported-by: Arthur Marsh <arthur.marsh@internode.on.net>
Tested-by: Arthur Marsh <arthur.marsh@internode.on.net>
Fixes: 93c2e105f6bc ("module: Optimize __module_address() using a latched RB-tree")
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
| -rw-r--r-- | kernel/module.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/module.c b/kernel/module.c index 3e0e19763d24..4d2b82e610e2 100644 --- a/kernel/module.c +++ b/kernel/module.c | |||
| @@ -3557,6 +3557,7 @@ static int load_module(struct load_info *info, const char __user *uargs, | |||
| 3557 | mutex_lock(&module_mutex); | 3557 | mutex_lock(&module_mutex); |
| 3558 | /* Unlink carefully: kallsyms could be walking list. */ | 3558 | /* Unlink carefully: kallsyms could be walking list. */ |
| 3559 | list_del_rcu(&mod->list); | 3559 | list_del_rcu(&mod->list); |
| 3560 | mod_tree_remove(mod); | ||
| 3560 | wake_up_all(&module_wq); | 3561 | wake_up_all(&module_wq); |
| 3561 | /* Wait for RCU-sched synchronizing before releasing mod->list. */ | 3562 | /* Wait for RCU-sched synchronizing before releasing mod->list. */ |
| 3562 | synchronize_sched(); | 3563 | synchronize_sched(); |
