Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Mar 2018 17:50:57 +1100 (EST)
From:      Bruce Evans <brde@optusnet.com.au>
To:        Warner Losh <imp@bsdimp.com>
Cc:        Konstantin Belousov <kostikbel@gmail.com>, Warner Losh <imp@freebsd.org>,  src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org,  svn-src-head@freebsd.org
Subject:   Re: svn commit: r331298 - head/sys/dev/syscons
Message-ID:  <20180322174025.Q1053@besplex.bde.org>
In-Reply-To: <CANCZdfrY9PQ-FUApReGeFqwH%2BdoSUN5AtvF0ag1rD09sKYq6gg@mail.gmail.com>
References:  <201803211447.w2LElDcK091988@repo.freebsd.org> <20180322024846.S4293@besplex.bde.org> <20180321202752.GO76926@kib.kiev.ua> <CANCZdfrY9PQ-FUApReGeFqwH%2BdoSUN5AtvF0ag1rD09sKYq6gg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 21 Mar 2018, Warner Losh wrote:

> On Wed, Mar 21, 2018 at 2:27 PM, Konstantin Belousov <kostikbel@gmail.com>
> 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 <CR> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20180322174025.Q1053>