From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-bl2on0093.outbound.protection.outlook.com ([65.55.169.93]:48787 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752478AbcFNQWr (ORCPT ); Tue, 14 Jun 2016 12:22:47 -0400 Message-ID: <57602F4F.8040104@caviumnetworks.com> Date: Tue, 14 Jun 2016 09:22:39 -0700 From: David Daney MIME-Version: 1.0 To: Greg Kroah-Hartman CC: Jiri Slaby , Peter Hurley , Ming Lei , Dann Frazier , Scot Doyle , David Airlie , , , Pavel Machek , , David Daney , Subject: Ping: [PATCH] tty: vt: Fix soft lockup in fbcon cursor blink timer. References: <1463510464-28124-1-git-send-email-ddaney.cavm@gmail.com> In-Reply-To: <1463510464-28124-1-git-send-email-ddaney.cavm@gmail.com> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Sender: stable-owner@vger.kernel.org List-ID: Greg et al., Now that the merge window is closed, please consider this patch. Thanks in advance, David Daney On 05/17/2016 11:41 AM, David Daney wrote: > From: David Daney > > We are getting somewhat random soft lockups with this signature: > > [ 86.992215] [] el1_irq+0xa0/0x10c > [ 86.997082] [] cursor_timer_handler+0x30/0x54 > [ 87.002991] [] call_timer_fn+0x54/0x1a8 > [ 87.008378] [] run_timer_softirq+0x1c4/0x2bc > [ 87.014200] [] __do_softirq+0x114/0x344 > [ 87.019590] [] irq_exit+0x74/0x98 > [ 87.024458] [] __handle_domain_irq+0x98/0xfc > [ 87.030278] [] 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 > 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; >