Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1179745
| Path | csiph.com!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Peter Zijlstra <peterz@infradead.org> |
| Newsgroups | linux.kernel |
| Subject | [PATCH] module: Fix load_module() error path |
| Date | Wed, 08 Jul 2015 14:50:02 +0200 |
| Message-ID | <pJWXw-2KA-3@gated-at.bofh.it> (permalink) |
| References | <pJtLQ-1w8-3@gated-at.bofh.it> <pJvDY-2Dz-23@gated-at.bofh.it> <pJE4B-7Yw-101@gated-at.bofh.it> <pJHvs-1LQ-1@gated-at.bofh.it> <pJJ4d-2A0-1@gated-at.bofh.it> <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> |
| X-Original-To | Arthur Marsh <arthur.marsh@internode.on.net> |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Content-Disposition | inline |
| User-Agent | Mutt/1.5.21 (2012-12-30) |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 36 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Mathieu Desnoyers <mathieu.desnoyers@efficios.com>, linux-kernel@vger.kernel.org, Rusty Russell <rusty@rustcorp.com.au>, rostedt <rostedt@goodmis.org>, Oleg Nesterov <oleg@redhat.com>, "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> |
| X-Original-Date | Wed, 8 Jul 2015 14:41:27 +0200 |
| X-Original-Message-ID | <20150708124127.GV18673@twins.programming.kicks-ass.net> |
| X-Original-References | <559B63A2.4030601@internode.on.net> <20150707072951.GM3644@twins.programming.kicks-ass.net> <1736781680.1883.1436286785932.JavaMail.zimbra@efficios.com> <559C3371.2030704@internode.on.net> <20150707215620.GM19282@twins.programming.kicks-ass.net> <20150707221122.GU18673@twins.programming.kicks-ass.net> <559CDFE1.7060503@internode.on.net> <20150708090427.GY3644@twins.programming.kicks-ass.net> <559D0CD3.9000407@internode.on.net> <20150708123244.GO19282@twins.programming.kicks-ass.net> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | aioe.org linux.kernel:1179745 |
Show key headers only | View raw
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