]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
USB: serial: console: fix uninitialised spinlock
authorJohan Hovold <johan@kernel.org>
Wed, 8 Feb 2017 17:53:08 +0000 (18:53 +0100)
committerTim Gardner <tim.gardner@canonical.com>
Wed, 1 Mar 2017 14:13:35 +0000 (07:13 -0700)
commit66398acc1ed42c9fb2df9d12d6a85da20467e067
treebab0ee45c2fef2907fcb4e0d67a5a417c29071a6
parentc6812ace5efcad7d7819f3108f0a5e090516f972
USB: serial: console: fix uninitialised spinlock

BugLink: http://bugs.launchpad.net/bugs/1668993
commit 14816b16fa0adac24f82492f18fa62c55acabbbe upstream.

Since commit 4a510969374a ("tty: Make tty_files_lock per-tty") a new
tty_struct spin lock is taken in the tty release path, but the
USB-serial-console hack was never updated hence leaving the lock of its
"fake" tty uninitialised. This was eventually detected by lockdep.

Make sure to initialise the new lock also for the fake tty to address
this regression.

Yes, this code is a mess, but cleaning it up is left for another day.

Fixes: 4a510969374a ("tty: Make tty_files_lock per-tty")
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
drivers/usb/serial/console.c