]> git.karo-electronics.de Git - linux-beck.git/commit
USB: serial: console: fix uninitialised spinlock
authorJohan Hovold <johan@kernel.org>
Wed, 8 Feb 2017 17:53:08 +0000 (18:53 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 26 Feb 2017 10:10:52 +0000 (11:10 +0100)
commitfef3fdf2d83cd0ca3bc0052ab58baab010929434
tree416aa00230ee5b22f133db155181a603c217dca3
parent960a38eae80a9e5ba9688c0eb92114f6de028904
USB: serial: console: fix uninitialised spinlock

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>
drivers/usb/serial/console.c