]> git.proxmox.com Git - mirror_ubuntu-jammy-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)
committerStefan Bader <stefan.bader@canonical.com>
Mon, 17 Oct 2022 09:56:51 +0000 (11:56 +0200)
commit6ef8ac62a4e213c9ac076b19b47c899d3eb8286e
treee7d5856c39ffb4bda72f4a01943ac320ac0c57bd
parent7de51373d1686c707acd42e544d65007f6646144
tty: n_gsm: fix missing corner cases in gsmld_poll()

BugLink: https://bugs.launchpad.net/bugs/1990162
[ Upstream commit 7e5b4322cde067e1d0f1bf8f490e93f664a7c843 ]

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: e1eaea46bb40 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/tty/n_gsm.c