Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'tty-4.20-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty

Pull tty driver fixes from Greg KH:
"Here are three small tty driver fixes for 4.20-rc6

Nothing major, just some bug fixes for reported issues. Full details
are in the shortlog.

All of these have been in linux-next for a while with no reported
issues"

* tag 'tty-4.20-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
kgdboc: fix KASAN global-out-of-bounds bug in param_set_kgdboc_var()
tty: serial: 8250_mtk: always resume the device in probe.
tty: do not set TTY_IO_ERROR flag if console port

+11 -12
+7 -9
drivers/tty/serial/8250/8250_mtk.c
··· 213 213 214 214 platform_set_drvdata(pdev, data); 215 215 216 - pm_runtime_enable(&pdev->dev); 217 - if (!pm_runtime_enabled(&pdev->dev)) { 218 - err = mtk8250_runtime_resume(&pdev->dev); 219 - if (err) 220 - return err; 221 - } 216 + err = mtk8250_runtime_resume(&pdev->dev); 217 + if (err) 218 + return err; 222 219 223 220 data->line = serial8250_register_8250_port(&uart); 224 221 if (data->line < 0) 225 222 return data->line; 223 + 224 + pm_runtime_set_active(&pdev->dev); 225 + pm_runtime_enable(&pdev->dev); 226 226 227 227 return 0; 228 228 } ··· 234 234 pm_runtime_get_sync(&pdev->dev); 235 235 236 236 serial8250_unregister_port(data->line); 237 + mtk8250_runtime_suspend(&pdev->dev); 237 238 238 239 pm_runtime_disable(&pdev->dev); 239 240 pm_runtime_put_noidle(&pdev->dev); 240 - 241 - if (!pm_runtime_status_suspended(&pdev->dev)) 242 - mtk8250_runtime_suspend(&pdev->dev); 243 241 244 242 return 0; 245 243 }
+2 -2
drivers/tty/serial/kgdboc.c
··· 233 233 static int param_set_kgdboc_var(const char *kmessage, 234 234 const struct kernel_param *kp) 235 235 { 236 - int len = strlen(kmessage); 236 + size_t len = strlen(kmessage); 237 237 238 238 if (len >= MAX_CONFIG_LEN) { 239 239 pr_err("config string too long\n"); ··· 254 254 255 255 strcpy(config, kmessage); 256 256 /* Chop out \n char as a result of echo */ 257 - if (config[len - 1] == '\n') 257 + if (len && config[len - 1] == '\n') 258 258 config[len - 1] = '\0'; 259 259 260 260 if (configured == 1)
+2 -1
drivers/tty/tty_port.c
··· 633 633 if (tty_port_close_start(port, tty, filp) == 0) 634 634 return; 635 635 tty_port_shutdown(port, tty); 636 - set_bit(TTY_IO_ERROR, &tty->flags); 636 + if (!port->console) 637 + set_bit(TTY_IO_ERROR, &tty->flags); 637 638 tty_port_close_end(port, tty); 638 639 tty_port_tty_set(port, NULL); 639 640 }