public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: David Daney <ddaney.cavm@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jiri Slaby <jslaby@suse.com>,
	Peter Hurley <peter@hurleysoftware.com>,
	Ming Lei <ming.lei@canonical.com>,
	Dann Frazier <dann.frazier@canonical.com>,
	Scot Doyle <lkml14@scotdoyle.com>,
	David Airlie <airlied@linux.ie>,
	dri-devel@lists.freedesktop.org,
	Radha.Chintakuntla@caviumnetworks.com,
	Pavel Machek <pavel@ucw.cz>
Cc: linux-kernel@vger.kernel.org,
	David Daney <david.daney@cavium.com>,
	stable@vger.kernel.org
Subject: [PATCH] tty: vt: Fix soft lockup in fbcon cursor blink timer.
Date: Tue, 17 May 2016 11:41:04 -0700	[thread overview]
Message-ID: <1463510464-28124-1-git-send-email-ddaney.cavm@gmail.com> (raw)

From: David Daney <david.daney@cavium.com>

We are getting somewhat random soft lockups with this signature:

[   86.992215] [<fffffc00080935e0>] el1_irq+0xa0/0x10c
[   86.997082] [<fffffc000841822c>] cursor_timer_handler+0x30/0x54
[   87.002991] [<fffffc000810ec44>] call_timer_fn+0x54/0x1a8
[   87.008378] [<fffffc000810ef88>] run_timer_softirq+0x1c4/0x2bc
[   87.014200] [<fffffc000809077c>] __do_softirq+0x114/0x344
[   87.019590] [<fffffc00080af45c>] irq_exit+0x74/0x98
[   87.024458] [<fffffc00080fac20>] __handle_domain_irq+0x98/0xfc
[   87.030278] [<fffffc000809056c>] gic_handle_irq+0x94/0x190

This is caused by the vt visual_init() function calling into
fbcon_init() with a vc_cur_blink_ms value of zero.  This is a
transient condition, as it is later set to a non-zero value.  But, if
the timer happens to expire while the blink rate is zero, it goes into
an endless loop, and we get soft lockup.

The fix is to initialize vc_cur_blink_ms before calling the con_init()
function.

Signed-off-by: David Daney <david.daney@cavium.com>
Cc: stable@vger.kernel.org
---
 drivers/tty/vt/vt.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
index 3e3c757..eef5c36 100644
--- a/drivers/tty/vt/vt.c
+++ b/drivers/tty/vt/vt.c
@@ -750,6 +750,7 @@ static void visual_init(struct vc_data *vc, int num, int init)
 	vc->vc_complement_mask = 0;
 	vc->vc_can_do_color = 0;
 	vc->vc_panic_force_write = false;
+	vc->vc_cur_blink_ms = DEFAULT_CURSOR_BLINK_MS;
 	vc->vc_sw->con_init(vc, init);
 	if (!vc->vc_complement_mask)
 		vc->vc_complement_mask = vc->vc_can_do_color ? 0x7700 : 0x0800;
-- 
1.8.3.1


             reply	other threads:[~2016-05-17 18:41 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-17 18:41 David Daney [this message]
2016-05-17 20:49 ` [PATCH] tty: vt: Fix soft lockup in fbcon cursor blink timer Pavel Machek
2016-05-18  0:42   ` Ming Lei
2016-05-18 20:24     ` Scot Doyle
2016-05-18 20:38       ` David Daney
2016-05-19  4:21         ` [PATCH] fbcon: use default if cursor blink interval is not valid Scot Doyle
2016-05-19  7:25           ` Jeremy Kerr
2016-05-19  8:29           ` Ming Lei
2016-05-19  9:01           ` Pavel Machek
2016-05-19 15:59           ` David Daney
2016-05-19 22:25             ` Scot Doyle
2016-05-19 22:31               ` [PATCH] fbcon: warn on invalid cursor blink intervals Scot Doyle
2016-05-19 22:50                 ` David Daney
2016-05-20  1:21                 ` Jeremy Kerr
2016-05-20  2:17                 ` Ming Lei
2016-05-20  2:26                   ` Jeremy Kerr
2016-05-20  2:48                     ` Ming Lei
2016-05-20  5:04                       ` Jeremy Kerr
2016-05-20 16:27                         ` Scot Doyle
2016-05-24  1:19                           ` Scot Doyle
2016-05-28 11:48                           ` Henrique de Moraes Holschuh
2016-06-12  5:05                             ` Chintakuntla, Radha
2016-05-28 11:45                 ` Henrique de Moraes Holschuh
2016-05-19  0:27       ` [PATCH] tty: vt: Fix soft lockup in fbcon cursor blink timer Ming Lei
2016-05-19  7:08         ` Pavel Machek
2016-05-19 22:35 ` Scot Doyle
2016-05-28 11:44 ` Henrique de Moraes Holschuh
2016-06-14 16:22 ` Ping: " David Daney

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=1463510464-28124-1-git-send-email-ddaney.cavm@gmail.com \
    --to=ddaney.cavm@gmail.com \
    --cc=Radha.Chintakuntla@caviumnetworks.com \
    --cc=airlied@linux.ie \
    --cc=dann.frazier@canonical.com \
    --cc=david.daney@cavium.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkml14@scotdoyle.com \
    --cc=ming.lei@canonical.com \
    --cc=pavel@ucw.cz \
    --cc=peter@hurleysoftware.com \
    --cc=stable@vger.kernel.org \
    /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