Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1403993

Re: [PATCH] fbcon: use default if cursor blink interval is not valid

From Scot Doyle <lkml14@scotdoyle.com>
Newsgroups linux.kernel
Subject Re: [PATCH] fbcon: use default if cursor blink interval is not valid
Date 2016-05-20 00:30 +0200
Message-ID <rAEC6-5K2-35@gated-at.bofh.it> (permalink)
References (2 earlier) <rzXQu-3gO-9@gated-at.bofh.it> <rAgq6-6Tl-7@gated-at.bofh.it> <rAnKV-3m2-7@gated-at.bofh.it> <rAnKV-3m2-5@gated-at.bofh.it> <rAEC6-5K2-37@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, 19 May 2016, David Daney wrote:
> On 05/18/2016 09:21 PM, Scot Doyle wrote:
> > Two current [1] and three previous [2] systems locked during boot
> > because the cursor flash timer was set using an ops->cur_blink_jiffies
> > value of 0. Previous patches attempted to solve the problem by moving
> > variable initialization earlier in the setup sequence [2].
> > 
> > Use the normal cursor blink default interval of 200 ms if
> > ops->cur_blink_jiffies is not in the range specified in commit
> > bd63364caa8d. Since invalid values are not used, specific system
> > initialization timings should not cause lockups.
> > 
> 
> This patch just papers over the problem that you yourself introduced in commit
> bd63364caa8d ("vt: add cursor blink interval escape sequence").
> 
> As you know, I have a patch that fixes the problem at the source:
> https://lkml.org/lkml/2016/5/17/455
> 
> I don't like the idea of silently ignoring bad values passed in from other
> code (drivers/tty/vt/vt.c), and much less doing the check for bad values each
> time the timer expires rather than just once, where the bad value is first
> introduced.
> 
> I think it would be preferable to WARN() at the site the bad value is
> introduced, so that we can easily find the real source of the problem.
> Initialize cur_blink_jiffies to a sane default value, then if something
> attempts to set it to a value that would cause soft lockup, WARN and refuse to
> change it.

I agree this approach would be cleaner and am willing to give it a try
by submitting an alternative patch and ack'ing yours. Thanks for taking 
the time to critique my proposal.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] tty: vt: Fix soft lockup in fbcon cursor blink timer. David Daney <ddaney.cavm@gmail.com> - 2016-05-17 20:50 +0200
  Re: [PATCH] tty: vt: Fix soft lockup in fbcon cursor blink timer. Pavel Machek <pavel@ucw.cz> - 2016-05-17 22:50 +0200
    Re: [PATCH] tty: vt: Fix soft lockup in fbcon cursor blink timer. Ming Lei <ming.lei@canonical.com> - 2016-05-18 02:50 +0200
      Re: [PATCH] tty: vt: Fix soft lockup in fbcon cursor blink timer. Scot Doyle <lkml14@scotdoyle.com> - 2016-05-18 22:40 +0200
        Re: [PATCH] tty: vt: Fix soft lockup in fbcon cursor blink timer. Ming Lei <ming.lei@canonical.com> - 2016-05-19 02:30 +0200
          Re: [PATCH] tty: vt: Fix soft lockup in fbcon cursor blink timer. Pavel Machek <pavel@ucw.cz> - 2016-05-19 09:10 +0200
        [PATCH] fbcon: use default if cursor blink interval is not valid Scot Doyle <lkml14@scotdoyle.com> - 2016-05-19 06:30 +0200
          Re: [PATCH] fbcon: use default if cursor blink interval is not valid Jeremy Kerr <jk@ozlabs.org> - 2016-05-19 09:30 +0200
          Re: [PATCH] fbcon: use default if cursor blink interval is not valid Ming Lei <ming.lei@canonical.com> - 2016-05-19 10:40 +0200
          Re: [PATCH] fbcon: use default if cursor blink interval is not valid Pavel Machek <pavel@ucw.cz> - 2016-05-19 11:10 +0200
            Re: [PATCH] fbcon: use default if cursor blink interval is not  valid Scot Doyle <lkml14@scotdoyle.com> - 2016-05-19 16:30 +0200
              Re: [PATCH] fbcon: use default if cursor blink interval is not valid Ming Lei <ming.lei@canonical.com> - 2016-05-19 17:40 +0200
          Re: [PATCH] fbcon: use default if cursor blink interval is not  valid Scot Doyle <lkml14@scotdoyle.com> - 2016-05-20 00:30 +0200
            [PATCH] fbcon: warn on invalid cursor blink intervals Scot Doyle <lkml14@scotdoyle.com> - 2016-05-20 00:40 +0200
              Re: [PATCH] fbcon: warn on invalid cursor blink intervals Jeremy Kerr <jk@ozlabs.org> - 2016-05-20 03:30 +0200
              Re: [PATCH] fbcon: warn on invalid cursor blink intervals Ming Lei <ming.lei@canonical.com> - 2016-05-20 04:20 +0200
                Re: [PATCH] fbcon: warn on invalid cursor blink intervals Jeremy Kerr <jk@ozlabs.org> - 2016-05-20 04:30 +0200
                Re: [PATCH] fbcon: warn on invalid cursor blink intervals Ming Lei <ming.lei@canonical.com> - 2016-05-20 04:50 +0200
                Re: [PATCH] fbcon: warn on invalid cursor blink intervals Jeremy Kerr <jk@ozlabs.org> - 2016-05-20 07:10 +0200
                Re: [PATCH] fbcon: warn on invalid cursor blink intervals Scot Doyle <lkml14@scotdoyle.com> - 2016-05-20 18:30 +0200
                Re: [PATCH] fbcon: warn on invalid cursor blink intervals Scot Doyle <lkml14@scotdoyle.com> - 2016-05-24 03:30 +0200
                Re: [PATCH] fbcon: warn on invalid cursor blink intervals Henrique de Moraes Holschuh <hmh@hmh.eng.br> - 2016-05-28 13:50 +0200
              Re: [PATCH] fbcon: warn on invalid cursor blink intervals Henrique de Moraes Holschuh <hmh@hmh.eng.br> - 2016-05-28 13:50 +0200
  Re: [PATCH] tty: vt: Fix soft lockup in fbcon cursor blink timer. Scot Doyle <lkml14@scotdoyle.com> - 2016-05-20 00:40 +0200
  Re: [PATCH] tty: vt: Fix soft lockup in fbcon cursor blink timer. Henrique de Moraes Holschuh <hmh@hmh.eng.br> - 2016-05-28 13:50 +0200

csiph-web