Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp4040418ybn; Fri, 27 Sep 2019 15:28:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqwyeS1iQMSjsLMkxPD8eIXP+oEbCePg4zGo52Nd019BF9wxRyOaIrmHuemYp08JziYygmRW X-Received: by 2002:a05:6402:1699:: with SMTP id a25mr7206112edv.91.1569623299020; Fri, 27 Sep 2019 15:28:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569623299; cv=none; d=google.com; s=arc-20160816; b=MRzyGI3FgLvdenHXEB/RT4Io4srG12S7/M6cTW4Z2qbVY0OJeJNvcURj38eku/x6qk JfczsIYUDNk01s95dtk/G0/0niNvHuasdS/TlJaqgiGQ1hba6NdGyZAxyG54rysyR93a 7egfpjtcnVlULXvXnbTiPFVprKEf+tXG91O8DirZ5KxGYQnSvD8Xd3rDlWH97g896P8i 5gQYf4JcOVd66S3AQ3xIOCs8nSihIFmiobIFK4h6aO05ZcIJCUxnC8uQaplGz/qKJzdT iTrmYF1OyjBETMqCK8J/WqaW1HRkY/ppVsRB7W6hTy2QJYJktKLud30KAom4OC7rqDlj jWVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=sTUGYV4HRk1ZGxJwVj6MQXBA7R1gfQ02c2i8inwWvt4=; b=hWkWk3YgSVa/stbueCXAjUtJqWNtu5/DlEKu14hyrMkHXEngg4SF5bIu+UU0fteWvU ag2A3yIKYjejdfiDzDtTqyZTvpDo/EUlspkM9izAAhanPtGl0pNDrsceYymEumn7tIKE NP4yHnyby+lkg78r6nnJV90fr1HBW5yqbZmmqGKZNQdhI62rzzqXdXKKPVvwkdm5cYk7 qfmgloFjF5UyV1MrXncAca/S1BYyJF+f98pHP5O7eZUwFgrH9BmH1Wp12h947nIzxUgI WMWx/PX1Eg5Bs8mX5yJWu7O4NIwrGd+7xsE2veQiuRDa85H3/tm5wbFSbc4acWIAgveV XjUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=VlJgK4Eq; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e5si3543220ejj.70.2019.09.27.15.27.53; Fri, 27 Sep 2019 15:28:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=VlJgK4Eq; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728378AbfI0WZT (ORCPT + 99 others); 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