]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge tag 'tty-4.7-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 1 Jul 2016 16:20:12 +0000 (09:20 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 1 Jul 2016 16:20:12 +0000 (09:20 -0700)
Pull tty fixes from Greg KH:
 "Here are two tty fixes for some reported issues.  One resolves a crash
  in devpts, and the other resolves a problem with the fbcon cursor
  blink causing lockups.

  Both have been in linux-next with no reported problems"

* tag 'tty-4.7-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
  devpts: fix null pointer dereference on failed memory allocation
  tty: vt: Fix soft lockup in fbcon cursor blink timer.

drivers/tty/pty.c
drivers/tty/vt/vt.c

index f856c4544eeaea7ac243e4a0fb2a6383524f60b0..51e0d32883ba7d3bbb5b626dcb6314a49d210dff 100644 (file)
@@ -667,8 +667,11 @@ static void pty_unix98_remove(struct tty_driver *driver, struct tty_struct *tty)
                fsi = tty->driver_data;
        else
                fsi = tty->link->driver_data;
-       devpts_kill_index(fsi, tty->index);
-       devpts_release(fsi);
+
+       if (fsi) {
+               devpts_kill_index(fsi, tty->index);
+               devpts_release(fsi);
+       }
 }
 
 static const struct tty_operations ptm_unix98_ops = {
index dc125322f48f9d8c958ff09ce6e0406e77d48882..5b0fe97c46ca9fb0bff6b66e0638226bf1b5781d 100644 (file)
@@ -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;