summaryrefslogtreecommitdiff
path: root/drivers/accessibility
diff options
context:
space:
mode:
authorDaniel Starke <daniel.starke@siemens.com>2024-04-24 07:48:42 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-06-12 11:02:55 +0200
commit8a6e6b1644e9c2f8b11882ee928a2a92bc81b332 (patch)
treec2cc05917c6b766bdb9f69a7fa541f6d3fd74e63 /drivers/accessibility
parent46f52c89a7e7d2691b97a9728e4591d071ca8abc (diff)
downloadlinux-8a6e6b1644e9c2f8b11882ee928a2a92bc81b332.tar.gz
linux-8a6e6b1644e9c2f8b11882ee928a2a92bc81b332.tar.bz2
linux-8a6e6b1644e9c2f8b11882ee928a2a92bc81b332.zip
tty: n_gsm: fix missing receive state reset after mode switch
commit 70d7f1427afcf7fa2d21cb5a04c6f3555d5b9357 upstream. The current implementation uses either gsm0_receive() or gsm1_receive() depending on whether the user configured the mux in basic or advanced option mode. Both functions share some state values over the same logical elements of the frame. However, both frame types differ in their nature. gsm0_receive() uses non-transparency framing, whereas gsm1_receive() uses transparency mechanism. Switching between both modes leaves the receive function in an undefined state when done during frame reception. Fix this by splitting both states. Add gsm0_receive_state_check_and_fix() and gsm1_receive_state_check_and_fix() to ensure that gsm->state is reset after a change of gsm->receive. Note that gsm->state is only accessed in: - gsm0_receive() - gsm1_receive() - gsm_error() Fixes: e1eaea46bb40 ("tty: n_gsm line discipline") Cc: stable@vger.kernel.org Signed-off-by: Daniel Starke <daniel.starke@siemens.com> Link: https://lore.kernel.org/r/20240424054842.7741-2-daniel.starke@siemens.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/accessibility')
0 files changed, 0 insertions, 0 deletions