From owner-svn-src-all@freebsd.org Thu Mar 22 07:07:59 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DAA5AF46641; Thu, 22 Mar 2018 07:07:59 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail105.syd.optusnet.com.au (mail105.syd.optusnet.com.au [211.29.132.249]) by mx1.freebsd.org (Postfix) with ESMTP id 4D874848C4; Thu, 22 Mar 2018 07:07:58 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from [192.168.0.102] (c110-21-101-228.carlnfd1.nsw.optusnet.com.au [110.21.101.228]) by mail105.syd.optusnet.com.au (Postfix) with ESMTPS id 1212B1047AC5; Thu, 22 Mar 2018 17:50:58 +1100 (AEDT) Date: Thu, 22 Mar 2018 17:50:57 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Warner Losh cc: Konstantin Belousov , Warner Losh , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r331298 - head/sys/dev/syscons In-Reply-To: Message-ID: <20180322174025.Q1053@besplex.bde.org> References: <201803211447.w2LElDcK091988@repo.freebsd.org> <20180322024846.S4293@besplex.bde.org> <20180321202752.GO76926@kib.kiev.ua> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=cIaQihWN c=1 sm=1 tr=0 a=PalzARQSbocsUSjMRkwAPg==:117 a=PalzARQSbocsUSjMRkwAPg==:17 a=kj9zAlcOel0A:10 a=pGLkceISAAAA:8 a=XDltxdv9FE5UCP5c3OgA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Mar 2018 07:08:00 -0000 On Wed, 21 Mar 2018, Warner Losh wrote: > On Wed, Mar 21, 2018 at 2:27 PM, Konstantin Belousov > wrote: >> ... >> Are you saying that fast interrupt handlers call shutdown_nice() ? This >> is the quite serious bug on its own. To fix it, shutdown_nice() should >> use a fast taskqueue to schedule the task which would lock the process >> and send the signal. > > Is there some way we know we're in a fast interrupt handler? If so, it > should be simple to fix. If not, then there's an API change ahead of us... There is a td_intr_nesting_level flag that might work. (I invented this, but don't like its current use.) > But bde is right: the system has to be in good enough shape to cope. I > wonder if we should put that coping into kdb_reboot() instead. It's only an > issue for TILDE ^R, which is a fairly edge case. shutdown_nice() is also called directly from syscons and vt for the reboot, halt and poweroff keys. This happens in normal interrupt handler context, so there is only a problem when init is not running. Bruce