stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Patch "USB: serial: console: fix uninitialised spinlock" has been added to the 4.10-stable tree
@ 2017-02-23 20:56 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-02-23 20:56 UTC (permalink / raw)
  To: johan, gregkh; +Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    USB: serial: console: fix uninitialised spinlock

to the 4.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     usb-serial-console-fix-uninitialised-spinlock.patch
and it can be found in the queue-4.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From 14816b16fa0adac24f82492f18fa62c55acabbbe Mon Sep 17 00:00:00 2001
From: Johan Hovold <johan@kernel.org>
Date: Wed, 8 Feb 2017 18:53:08 +0100
Subject: USB: serial: console: fix uninitialised spinlock

From: Johan Hovold <johan@kernel.org>

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 |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/usb/serial/console.c
+++ b/drivers/usb/serial/console.c
@@ -143,6 +143,7 @@ static int usb_console_setup(struct cons
 			tty->driver = usb_serial_tty_driver;
 			tty->index = co->index;
 			init_ldsem(&tty->ldisc_sem);
+			spin_lock_init(&tty->files_lock);
 			INIT_LIST_HEAD(&tty->tty_files);
 			kref_get(&tty->driver->kref);
 			__module_get(tty->driver->owner);


Patches currently in stable-queue which might be from johan@kernel.org are

queue-4.10/usb-serial-ftdi_sio-fix-modem-status-error-handling.patch
queue-4.10/usb-serial-cp210x-add-new-ids-for-ge-bx50v3-boards.patch
queue-4.10/usb-serial-ark3116-fix-register-accessor-error-handling.patch
queue-4.10/usb-serial-digi_acceleport-fix-oob-data-sanity-check.patch
queue-4.10/usb-serial-ftdi_sio-fix-line-status-over-reporting.patch
queue-4.10/usb-serial-ftdi_sio-fix-extreme-low-latency-setting.patch
queue-4.10/usb-serial-spcp8x5-fix-modem-status-handling.patch
queue-4.10/usb-serial-opticon-fix-cts-retrieval-at-open.patch
queue-4.10/usb-serial-mos7840-fix-another-null-deref-at-open.patch
queue-4.10/usb-serial-console-fix-uninitialised-spinlock.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-02-23 20:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-23 20:56 Patch "USB: serial: console: fix uninitialised spinlock" has been added to the 4.10-stable tree gregkh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).