From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754700AbbCQROI (ORCPT ); Tue, 17 Mar 2015 13:14:08 -0400 Received: from casper.infradead.org ([85.118.1.10]:49865 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753487AbbCQROD (ORCPT ); Tue, 17 Mar 2015 13:14:03 -0400 Date: Tue, 17 Mar 2015 18:13:54 +0100 From: Peter Zijlstra To: "Paul E. McKenney" Cc: mingo@kernel.org, rusty@rustcorp.com.au, mathieu.desnoyers@efficios.com, oleg@redhat.com, linux-kernel@vger.kernel.org, andi@firstfloor.org, rostedt@goodmis.org, tglx@linutronix.de Subject: Re: [RFC][PATCH 2/9] module: Sanitize RCU usage and locking Message-ID: <20150317171354.GG23123@twins.programming.kicks-ass.net> References: <20150228212447.381543289@infradead.org> <20150228213109.952835328@infradead.org> <20150302193706.GS15405@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150302193706.GS15405@linux.vnet.ibm.com> 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 On Mon, Mar 02, 2015 at 11:37:06AM -0800, Paul E. McKenney wrote: > > - /* Wait for RCU synchronizing before releasing mod->list and buglist. */ > > - synchronize_rcu(); > > + /* Wait for RCU-sched synchronizing before releasing mod->list and buglist. */ > > + synchronize_sched(); > > mutex_unlock(&module_mutex); > > There might be some reasons why the synchronize_sched() needs to be > within the module_mutex critical section, but safe freeing of memory > and the integrity of the list are not two of them. Doesn't hurt anything > unless someone is being very active with their modules, of course. Yeah, I could not find anything that relies on that; but I'm not too familiar with all the module stuff -- although a lot more now that I was a few weeks back ;-)