Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933025AbbGGWLr (ORCPT ); Tue, 7 Jul 2015 18:11:47 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:38048 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932700AbbGGWLk (ORCPT ); Tue, 7 Jul 2015 18:11:40 -0400 Date: Wed, 8 Jul 2015 00:11:22 +0200 From: Peter Zijlstra To: Arthur Marsh Cc: Mathieu Desnoyers , linux-kernel@vger.kernel.org, Rusty Russell , rostedt , Oleg Nesterov , "Paul E. McKenney" Subject: Re: lock-up with module: Optimize __module_address() using a latched RB-tree Message-ID: <20150707221122.GU18673@twins.programming.kicks-ass.net> References: <55997889.5020101@internode.on.net> <20150706100447.GX3644@twins.programming.kicks-ass.net> <559A545A.80508@internode.on.net> <20150706103246.GY3644@twins.programming.kicks-ass.net> <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150707215620.GM19282@twins.programming.kicks-ass.net> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1620 Lines: 45 On Tue, Jul 07, 2015 at 11:56:20PM +0200, Peter Zijlstra wrote: > On Wed, Jul 08, 2015 at 05:45:45AM +0930, Arthur Marsh wrote: > > I'm not aware of any modules being loaded with --force . > > > > I've applied the patch, thanks! > > > > The resultant kernel locked up as follows: > > > > http://www.users.on.net/~arthur.marsh/20150708469.jpg > > This has "Not tainted" which would indeed rule out forced loading. So > much for that idea :/ > > > http://www.users.on.net/~arthur.marsh/20150708470.jpg > > And that one has a bunch of NMI prints, curious those. But given Mathieu > made them return NULL, that completely rules out the most interesting > races. Could you try the below? It appears there was a spot freeing modules that forgot to take them out of the tree. If that fails, try and disable CONFIG_MODULE_UNLOAD. --- kernel/module.c | 1 + 1 file changed, 1 insertion(+) 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, 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/