summaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/serial_core.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-01-22 12:55:13 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-01-22 12:55:13 +0100
commit7a6aa989f2e844a22cfab5c8ff30e77d17dabb2f (patch)
treedd9c0dac74d0839fd0dd2fd24a59504d5180343a /drivers/tty/serial/serial_core.c
parent05e2600cb0a4d73b0779cf29512819616252aeeb (diff)
parent2241ab53cbb5cdb08a6b2d4688feb13971058f65 (diff)
downloadlinux-stable-7a6aa989f2e844a22cfab5c8ff30e77d17dabb2f.tar.gz
linux-stable-7a6aa989f2e844a22cfab5c8ff30e77d17dabb2f.tar.bz2
linux-stable-7a6aa989f2e844a22cfab5c8ff30e77d17dabb2f.zip
Merge 6.2-rc5 into tty-next
We need the serial/tty changes into this branch as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/serial_core.c')
-rw-r--r--drivers/tty/serial/serial_core.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
index 8633252339f4..2bd32c8ece39 100644
--- a/drivers/tty/serial/serial_core.c
+++ b/drivers/tty/serial/serial_core.c
@@ -2211,6 +2211,9 @@ EXPORT_SYMBOL_GPL(uart_parse_options);
* @parity: parity character - 'n' (none), 'o' (odd), 'e' (even)
* @bits: number of data bits
* @flow: flow control character - 'r' (rts)
+ *
+ * Locking: Caller must hold console_list_lock in order to serialize
+ * early initialization of the serial-console lock.
*/
int
uart_set_options(struct uart_port *port, struct console *co,
@@ -2618,7 +2621,9 @@ static int uart_poll_init(struct tty_driver *driver, int line, char *options)
if (!ret && options) {
uart_parse_options(options, &baud, &parity, &bits, &flow);
+ console_list_lock();
ret = uart_set_options(port, NULL, baud, parity, bits, flow);
+ console_list_unlock();
}
out:
mutex_unlock(&tport->mutex);