From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A4419C4360C for ; Fri, 27 Sep 2019 22:25:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7228A2075D for ; Fri, 27 Sep 2019 22:25:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="VlJgK4Eq" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728426AbfI0WZT (ORCPT ); Fri, 27 Sep 2019 18:25:19 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:47024 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726033AbfI0WZT (ORCPT ); Fri, 27 Sep 2019 18:25:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=sTUGYV4HRk1ZGxJwVj6MQXBA7R1gfQ02c2i8inwWvt4=; b=VlJgK4Eq+b3MnnjJxeu/JnAa+ x4TqWVhwwVaLrufkCBPVasHwEz44DlollM01jlLT+1Kck1hOMzzj4bvJ8HXWpTTeMCKDLJYTFiGOG 0UaEbs7nozp1Gg/JxaeDU8W7YY5OM4eZj8YakJDN/Bf8w/AIC3+V51LUM0RNLkFRbk1xw5Xqhxsyz zyveyYPfF/mAtEOfxyo30hVvXHpC52Sw715qXGPb7uhhY3xhcInHM/TlNg+AtzxNy0toy0vYQtFWl ezuQg3olXoXTl8G+7DLkgWbj0EIEfpNmdUL15zaqAL6K0RkDz/vCaU1OCk59v5lVSY3dLuQJxq7Hc a98H2Bfuw==; Received: from hch by bombadil.infradead.org with local (Exim 4.92.2 #3 (Red Hat Linux)) id 1iDyfu-0004FN-Lb; Fri, 27 Sep 2019 22:25:18 +0000 Date: Fri, 27 Sep 2019 15:25:18 -0700 From: Christoph Hellwig To: Vincent Chen Cc: linux-riscv@lists.infradead.org, palmer@sifive.com, linux-kernel@vger.kernel.org, aou@eecs.berkeley.edu, paul.walmsley@sifive.com Subject: Re: [PATCH 1/4] riscv: avoid kernel hangs when trapped in BUG() Message-ID: <20190927222518.GF4700@infradead.org> References: <1569199517-5884-1-git-send-email-vincent.chen@sifive.com> <1569199517-5884-2-git-send-email-vincent.chen@sifive.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1569199517-5884-2-git-send-email-vincent.chen@sifive.com> User-Agent: Mutt/1.12.1 (2019-06-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 23, 2019 at 08:45:14AM +0800, Vincent Chen wrote: > When the CONFIG_GENERIC_BUG is disabled by disabling CONFIG_BUG, if a > kernel thread is trapped by BUG(), the whole system will be in the > loop that infinitely handles the ebreak exception instead of entering the > die function. To fix this problem, the do_trap_break() will always call > the die() to deal with the break exception as the type of break is > BUG_TRAP_TYPE_BUG. > > Signed-off-by: Vincent Chen Looks good, Reviewed-by: Christoph Hellwig