]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - include/linux/tty.h
tty: Don't call panic() at tty_ldisc_init()
authorTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Thu, 5 Apr 2018 10:40:16 +0000 (19:40 +0900)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 14 Aug 2018 10:23:50 +0000 (12:23 +0200)
commitf46dad0dd1d2e7e8fbe55e815e03bd756f1e096d
treeacb08c22184ec27b5cfdaf2f6ace5916364420d6
parentd000661b03ea2b137ae166c674d1ce9e286b42a1
tty: Don't call panic() at tty_ldisc_init()

BugLink: http://bugs.launchpad.net/bugs/1778265
commit 903f9db10f18f735e62ba447147b6c434b6af003 upstream.

syzbot is reporting kernel panic [1] triggered by memory allocation failure
at tty_ldisc_get() from tty_ldisc_init(). But since both tty_ldisc_get()
and caller of tty_ldisc_init() can cleanly handle errors, tty_ldisc_init()
does not need to call panic() when tty_ldisc_get() failed.

[1] https://syzkaller.appspot.com/bug?id=883431818e036ae6a9981156a64b821110f39187

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Reported-by: syzbot <syzkaller@googlegroups.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jslaby@suse.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/tty/tty_io.c
drivers/tty/tty_ldisc.c
include/linux/tty.h