]> git.baikalelectronics.ru Git - kernel.git/commit
tty: n_gsm: fix missing corner cases in gsmld_poll()
authorDaniel Starke <daniel.starke@siemens.com>
Thu, 7 Jul 2022 11:32:23 +0000 (13:32 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Jul 2022 13:14:53 +0000 (15:14 +0200)
commitc71edbd18762c74cbaec386f60ad20c288f96525
treededd8fcee6a8431c32f000862162e37bc1cf73a7
parent8dbf0840aee67e3735562b92df891ccad87ef56e
tty: n_gsm: fix missing corner cases in gsmld_poll()

gsmld_poll() currently fails to handle the following corner cases correctly:
- remote party closed the associated tty

Add the missing checks and map those to EPOLLHUP.
Reorder the checks to group them by their reaction.

Fixes: 99551fa31543 ("tty: n_gsm line discipline")
Signed-off-by: Daniel Starke <daniel.starke@siemens.com>
Link: https://lore.kernel.org/r/20220707113223.3685-4-daniel.starke@siemens.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/n_gsm.c