Peter Zijlstra <[email protected]> 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 <[email protected]> > 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 <[email protected]> > Reported-by: Arthur Marsh <[email protected]> > Tested-by: Arthur Marsh <[email protected]> > Fixes: 93c2e105f6bc ("module: Optimize __module_address() using a latched > RB-tree") > Signed-off-by: Peter Zijlstra (Intel) <[email protected]> > --- > 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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

