From mboxrd@z Thu Jan 1 00:00:00 1970 From: Russell King - ARM Linux Date: Tue, 01 Dec 2015 23:44:37 +0000 Subject: Re: [PATCH v2 3/5] printk/nmi: Try hard to print Oops message in NMI context Message-Id: <20151201234437.GA8644@n2100.arm.linux.org.uk> List-Id: References: <1448622572-16900-1-git-send-email-pmladek@suse.com> <1448622572-16900-4-git-send-email-pmladek@suse.com> In-Reply-To: <1448622572-16900-4-git-send-email-pmladek@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-arm-kernel@lists.infradead.org On Fri, Nov 27, 2015 at 12:09:30PM +0100, Petr Mladek wrote: > What we can do, though, is to zap all printk locks. We already do this > when a printk recursion is detected. This should be safe because > the system is crashing and there shouldn't be any printk caller > that would cause the deadlock. What about serial consoles which may call out to subsystems like the clk subsystem to enable a clock, which would want to take their own spinlocks in addition to the serial console driver? I don't see bust_spinlocks() dealing with any of these locks, so IMHO trying to make this work in NMI context strikes me as making the existing solution more unreliable on ARM systems. -- FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up according to speedtest.net. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757426AbbLAXpK (ORCPT ); Tue, 1 Dec 2015 18:45:10 -0500 Received: from pandora.arm.linux.org.uk ([78.32.30.218]:46109 "EHLO pandora.arm.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756196AbbLAXpI (ORCPT ); Tue, 1 Dec 2015 18:45:08 -0500 Date: Tue, 1 Dec 2015 23:44:37 +0000 From: Russell King - ARM Linux To: Petr Mladek Cc: Andrew Morton , Peter Zijlstra , Steven Rostedt , Daniel Thompson , Jiri Kosina , Ingo Molnar , Thomas Gleixner , linux-kernel@vger.kernel.org, x86@kernel.org, linux-arm-kernel@lists.infradead.org, adi-buildroot-devel@lists.sourceforge.net, linux-cris-kernel@axis.com, linux-mips@linux-mips.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, Petr Mladek Subject: Re: [PATCH v2 3/5] printk/nmi: Try hard to print Oops message in NMI context Message-ID: <20151201234437.GA8644@n2100.arm.linux.org.uk> References: <1448622572-16900-1-git-send-email-pmladek@suse.com> <1448622572-16900-4-git-send-email-pmladek@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1448622572-16900-4-git-send-email-pmladek@suse.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 27, 2015 at 12:09:30PM +0100, Petr Mladek wrote: > What we can do, though, is to zap all printk locks. We already do this > when a printk recursion is detected. This should be safe because > the system is crashing and there shouldn't be any printk caller > that would cause the deadlock. What about serial consoles which may call out to subsystems like the clk subsystem to enable a clock, which would want to take their own spinlocks in addition to the serial console driver? I don't see bust_spinlocks() dealing with any of these locks, so IMHO trying to make this work in NMI context strikes me as making the existing solution more unreliable on ARM systems. -- FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up according to speedtest.net. From mboxrd@z Thu Jan 1 00:00:00 1970 From: linux@arm.linux.org.uk (Russell King - ARM Linux) Date: Tue, 1 Dec 2015 23:44:37 +0000 Subject: [PATCH v2 3/5] printk/nmi: Try hard to print Oops message in NMI context In-Reply-To: <1448622572-16900-4-git-send-email-pmladek@suse.com> References: <1448622572-16900-1-git-send-email-pmladek@suse.com> <1448622572-16900-4-git-send-email-pmladek@suse.com> Message-ID: <20151201234437.GA8644@n2100.arm.linux.org.uk> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Fri, Nov 27, 2015 at 12:09:30PM +0100, Petr Mladek wrote: > What we can do, though, is to zap all printk locks. We already do this > when a printk recursion is detected. This should be safe because > the system is crashing and there shouldn't be any printk caller > that would cause the deadlock. What about serial consoles which may call out to subsystems like the clk subsystem to enable a clock, which would want to take their own spinlocks in addition to the serial console driver? I don't see bust_spinlocks() dealing with any of these locks, so IMHO trying to make this work in NMI context strikes me as making the existing solution more unreliable on ARM systems. -- FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up according to speedtest.net.