From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932661AbcBAOGa (ORCPT ); Mon, 1 Feb 2016 09:06:30 -0500 Received: from e06smtp16.uk.ibm.com ([195.75.94.112]:56017 "EHLO e06smtp16.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932244AbcBAOG3 (ORCPT ); Mon, 1 Feb 2016 09:06:29 -0500 X-IBM-Helo: d06dlp01.portsmouth.uk.ibm.com X-IBM-MailFrom: heiko.carstens@de.ibm.com X-IBM-RcptTo: linux-kernel@vger.kernel.org Date: Mon, 1 Feb 2016 15:06:21 +0100 From: Heiko Carstens To: Andrew Morton Cc: Christian Borntraeger , linux-kernel@vger.kernel.org, Prarit Bhargava Subject: Re: [PATCH] lib/bug: make panic_on_warn available for all architectures Message-ID: <20160201140621.GB4166@osiris> References: <1453468336-60133-1-git-send-email-heiko.carstens@de.ibm.com> <20160126151408.85a48aa035a4e72243d4003c@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160126151408.85a48aa035a4e72243d4003c@linux-foundation.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16020114-0025-0000-0000-000008CCE587 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 26, 2016 at 03:14:08PM -0800, Andrew Morton wrote: > On Fri, 22 Jan 2016 14:12:16 +0100 Heiko Carstens wrote: > > > Christian Borntraeger reported that panic_on_warn doesn't have any > > effect on s390. > > > > The panic_on_warn feature was introduced with 9e3961a09798 ("kernel: > > add panic_on_warn"). However it did care only for the case when > > WANT_WARN_ON_SLOWPATH is defined. This is turn is only the case for > > architectures which do not have an own __WARN_TAINT defined. > > > > Other architectures which do have __WARN_TAINT defined call > > report_bug() for warnings within lib/bug.c which does not call panic() > > in case panic_on_warn is set. > > > > Let's simply enable the panic_on_warn feature by adding the same code > > like it was added to warn_slowpath_common() in panic.c. > > > > This enables panic_on_warn also for arm64, parisc, powerpc, s390 and > > sh. > > > > It's a bit sad to do this in two places. You couldn't find a suitable > place which is effective for all architectures? Yes, I know, it's lame. But looking at lib/bug.c:report_bug() and kernel/panic.c:warn_slowpath_common() it looks like these functions have a lot in common but differ in detail. It seems hard to combine them without introducing an ifdef hell.