Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1179745
| From | Peter Zijlstra <peterz@infradead.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] module: Fix load_module() error path |
| Date | 2015-07-08 14:50 +0200 |
| Message-ID | <pJWXw-2KA-3@gated-at.bofh.it> (permalink) |
| References | (5 earlier) <pJJnA-2VR-13@gated-at.bofh.it> <pJT3B-pl-33@gated-at.bofh.it> <pJTwB-On-5@gated-at.bofh.it> <pJW1r-2b6-5@gated-at.bofh.it> <pJWNR-2GX-27@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, Jul 08, 2015 at 02:32:44PM +0200, Peter Zijlstra wrote:
> Awesome, lemme go write up a proper patch to make Rusty happy too ;-)
---
Subject: module: Fix load_module() error path
From: Peter Zijlstra <peterz@infradead.org>
Date: Wed Jul 8 14:35:58 CEST 2015
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>
---
kernel/module.c | 1 +
1 file changed, 1 insertion(+)
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -3557,6 +3557,7 @@ static int load_module(struct load_info
mutex_lock(&module_mutex);
/* Unlink carefully: kallsyms could be walking list. */
list_del_rcu(&mod->list);
+ mod_tree_remove(mod);
wake_up_all(&module_wq);
/* Wait for RCU-sched synchronizing before releasing mod->list. */
synchronize_sched();
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: lock-up with module: Optimize __module_address() using a latched RB-tree Mathieu Desnoyers <mathieu.desnoyers@efficios.com> - 2015-07-07 18:40 +0200
Re: lock-up with module: Optimize __module_address() using a latched RB-tree Peter Zijlstra <peterz@infradead.org> - 2015-07-08 14:40 +0200
[PATCH] module: Fix load_module() error path Peter Zijlstra <peterz@infradead.org> - 2015-07-08 14:50 +0200
csiph-web