From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752789AbaKGVJp (ORCPT ); Fri, 7 Nov 2014 16:09:45 -0500 Received: from mail-ie0-f173.google.com ([209.85.223.173]:61187 "EHLO mail-ie0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752612AbaKGVJn (ORCPT ); Fri, 7 Nov 2014 16:09:43 -0500 Date: Fri, 7 Nov 2014 13:09:40 -0800 (PST) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Prarit Bhargava cc: Vivek Goyal , linux-kernel@vger.kernel.org, Jonathan Corbet , Andrew Morton , Rusty Russell , "H. Peter Anvin" , Andi Kleen , Masami Hiramatsu , Fabian Frederick , isimatu.yasuaki@jp.fujitsu.com, jbaron@akamai.com, linux-doc@vger.kernel.org, kexec@lists.infradead.org, linux-api@vger.kernel.org Subject: Re: [PATCH v8] kernel, add panic_on_warn In-Reply-To: <545CA765.8010403@redhat.com> Message-ID: References: <1415187736-16242-1-git-send-email-prarit@redhat.com> <545B733C.6080903@redhat.com> <20141106220731.GA13590@redhat.com> <545CA765.8010403@redhat.com> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 7 Nov 2014, Prarit Bhargava wrote: > There very much is. Consider a thread that hits a WARN() and then panics. Then > somewhere in the panic code the thread hits another WARN() ... and then panics > again. Previously this would have caused the system to "finish" panick'ing. > Now it makes the system hang. > Then we're back to square one which is what is obviously the intent of your patch and the comment that goes along with it: we want to clear panic_on_warn once and not allow multiple panic(). So why not just add the necessary synchronization to make sure that happens when WARN() happens on two cpus simultaneously?