From: Greg KH <gregkh@linuxfoundation.org>
To: Mark Tomlinson <mark.tomlinson@alliedtelesis.co.nz>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH RESEND] tty/sysrq: Do not call sync directly from sysrq_do_reset()
Date: Tue, 27 Nov 2018 11:11:35 +0100 [thread overview]
Message-ID: <20181127101135.GA15856@kroah.com> (raw)
In-Reply-To: <20181126205723.14478-1-mark.tomlinson@alliedtelesis.co.nz>
On Tue, Nov 27, 2018 at 09:57:23AM +1300, Mark Tomlinson wrote:
> sysrq_do_reset() is called in softirq context, so it cannot call
> sync() directly. Instead, call orderly_reboot(), which creates a work
> item to run /sbin/reboot, or do emergency_sync and restart if the
> command fails.
>
> Signed-off-by: Mark Tomlinson <mark.tomlinson@alliedtelesis.co.nz>
> ---
> drivers/tty/sysrq.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/tty/sysrq.c b/drivers/tty/sysrq.c
> index ad1ee5d01b53..f2ca32c1ad7c 100644
> --- a/drivers/tty/sysrq.c
> +++ b/drivers/tty/sysrq.c
> @@ -660,8 +660,7 @@ static void sysrq_do_reset(struct timer_list *t)
>
> state->reset_requested = true;
>
> - ksys_sync();
> - kernel_restart(NULL);
> + orderly_reboot();
Is this something new? Why haven't we had reports of this failing in
the past? Or has something changed recently to cause this to now be
needed?
thanks,
greg k-h
next prev parent reply other threads:[~2018-11-27 10:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-26 20:57 [PATCH RESEND] tty/sysrq: Do not call sync directly from sysrq_do_reset() Mark Tomlinson
2018-11-27 10:11 ` Greg KH [this message]
2018-11-27 19:58 ` Mark Tomlinson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181127101135.GA15856@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.tomlinson@alliedtelesis.co.nz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox