From: Rusty Russell <rusty@rustcorp.com.au>
To: Peter Zijlstra <peterz@infradead.org>,
Arthur Marsh <arthur.marsh@internode.on.net>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
linux-kernel@vger.kernel.org, rostedt <rostedt@goodmis.org>,
Oleg Nesterov <oleg@redhat.com>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Subject: Re: [PATCH] module: Fix load_module() error path
Date: Thu, 09 Jul 2015 07:03:03 +0930 [thread overview]
Message-ID: <87zj36tjw0.fsf@rustcorp.com.au> (raw)
In-Reply-To: <20150708124127.GV18673@twins.programming.kicks-ass.net>
Peter Zijlstra <peterz@infradead.org> writes:
> 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 ;-)
Thanks, Rusty is happy :)
Applied, and pushed to Linus.
Cheers,
Rusty.
> ---
> 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();
prev parent reply other threads:[~2015-07-08 21:44 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-05 18:33 lock-up with module: Optimize __module_address() using a latched RB-tree Arthur Marsh
2015-07-06 7:19 ` Peter Zijlstra
2015-07-06 7:35 ` Arthur Marsh
2015-07-06 7:53 ` Arthur Marsh
2015-07-06 7:57 ` Peter Zijlstra
2015-07-06 8:12 ` Peter Zijlstra
2015-07-06 8:47 ` Arthur Marsh
2015-07-06 9:01 ` Peter Zijlstra
2015-07-06 10:04 ` Peter Zijlstra
2015-07-06 10:11 ` Arthur Marsh
2015-07-06 10:32 ` Peter Zijlstra
2015-07-06 11:26 ` Arthur Marsh
2015-07-07 5:29 ` Arthur Marsh
2015-07-07 7:29 ` Peter Zijlstra
2015-07-07 15:58 ` Arthur Marsh
2015-07-07 16:33 ` Mathieu Desnoyers
2015-07-07 20:15 ` Arthur Marsh
2015-07-07 21:56 ` Peter Zijlstra
2015-07-07 22:11 ` Peter Zijlstra
2015-07-08 0:55 ` Rusty Russell
2015-07-08 8:31 ` Arthur Marsh
2015-07-08 9:04 ` Peter Zijlstra
2015-07-08 11:43 ` Arthur Marsh
2015-07-08 12:32 ` Peter Zijlstra
2015-07-08 12:41 ` [PATCH] module: Fix load_module() error path Peter Zijlstra
2015-07-08 21:33 ` Rusty Russell [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zj36tjw0.fsf@rustcorp.com.au \
--to=rusty@rustcorp.com.au \
--cc=arthur.marsh@internode.on.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=oleg@redhat.com \
--cc=paulmck@linux.vnet.ibm.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome