]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
tty: fix termios input-speed encoding
authorJohan Hovold <johan@kernel.org>
Sun, 15 Jul 2018 13:39:33 +0000 (15:39 +0200)
committerJuerg Haefliger <juergh@canonical.com>
Wed, 24 Jul 2019 01:49:16 +0000 (19:49 -0600)
commit5c36df7ab197f1ccfac5a625bed10f5940c863aa
tree6af34a6b550a67cb72b5bcee8650be54fa97a19f
parentd7a3bb7e856ff6b8b40f4ca2ff41a69a5f9d4af3
tty: fix termios input-speed encoding

BugLink: https://bugs.launchpad.net/bugs/1836117
[ Upstream commit fada18c48d774b9e837928ecdce6a5d5fdd11ee7 ]

Make sure to clear the CIBAUD bits before OR-ing the new mask when
encoding the termios input baud rate.

This could otherwise lead to an incorrect input rate being reported back
and incidentally set on subsequent termios updates.

Fixes: edc6afc54968 ("[PATCH] tty: switch to ktermios and new framework")
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/tty/tty_baudrate.c