Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756444Ab2K3XVw (ORCPT ); Fri, 30 Nov 2012 18:21:52 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:51290 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756411Ab2K3XVv (ORCPT ); Fri, 30 Nov 2012 18:21:51 -0500 Date: Fri, 30 Nov 2012 15:21:49 -0800 From: Andrew Morton To: Seiji Aguchi Cc: "linux-kernel@vger.kernel.org" , "joe@perches.com" , "gregkh@linuxfoundation.org" , "kay@vrfy.org" , "jim.cromie@gmail.com" , "mingo@elte.hu" , "sboyd@codeaurora.org" , "jason.wessel@windriver.com" , "a.p.zijlstra@chello.nl" , "rostedt@goodmis.org" , "dle-develop@lists.sourceforge.net" , Satoru Moriya Subject: Re: [PATCH] Avoid dead lock of console related locks in panic case Message-Id: <20121130152149.6f266216.akpm@linux-foundation.org> In-Reply-To: References: <20121130143023.2d67d817.akpm@linux-foundation.org> X-Mailer: Sylpheed 3.0.2 (GTK+ 2.20.1; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1214 Lines: 30 On Fri, 30 Nov 2012 22:59:13 +0000 Seiji Aguchi wrote: > > > > Let's step back a bit. Please identify with great specificity the code sites which are stopping other CPUs before taking locks which > > those other CPUs might have been holding. > > > > Then let's see what we can do to fix up the callers, instead of trying to tidy up after they have made this mess. > > OK. > I will update my patch without adding complexity. > The logic will be as follows, if I understand your comment correctly. > > - take console related locks (logbuf_lock, console_sem) > - stop other cpus > - release those locks That would be one way around the problem. It's still a bit messy, because we'll have to take more and more locks in the future, as we identify them. What I actually meant was: can "this" CPU avoid stopping other CPUs so early? If we stop the other CPUs when this CPU is ready to stop itself then there will never be such deadlocks. -- 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/