diff options
author | Petr Mladek <pmladek@suse.com> | 2023-01-19 14:56:38 +0100 |
---|---|---|
committer | Petr Mladek <pmladek@suse.com> | 2023-01-19 14:56:38 +0100 |
commit | 21493c6e96e550509ead696ecca9f0d7196ee91c (patch) | |
tree | 6c6a106d6459a7b140e61266dffd66c960dd298e /drivers/tty/serial/serial_core.c | |
parent | 98d0052d0d9dcd5323833482712b5799ed0bbb0b (diff) | |
parent | 4fe59a130c112460626a6a8b9232aa580d9b8efc (diff) | |
download | linux-21493c6e96e550509ead696ecca9f0d7196ee91c.tar.gz linux-21493c6e96e550509ead696ecca9f0d7196ee91c.tar.bz2 linux-21493c6e96e550509ead696ecca9f0d7196ee91c.zip |
Merge branch 'rework/console-list-lock' into for-linus
Diffstat (limited to 'drivers/tty/serial/serial_core.c')
-rw-r--r-- | drivers/tty/serial/serial_core.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c index b9fbbee598b8..ec874f3a567c 100644 --- a/drivers/tty/serial/serial_core.c +++ b/drivers/tty/serial/serial_core.c @@ -2212,6 +2212,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, @@ -2619,7 +2622,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); |