summaryrefslogtreecommitdiffstats
path: root/drivers/tty/hvc/hvcs.c
diff options
context:
space:
mode:
authorBrian King <brking@linux.vnet.ibm.com>2023-02-03 09:58:01 -0600
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-02-08 13:09:15 +0100
commitd432228bc7b1b3f0ed06510278ff5a77b3749fe6 (patch)
treef23cc0493a758d4d473283da073a754079ec8764 /drivers/tty/hvc/hvcs.c
parent3a8d3b366ce47024bf274eac783f8af5df2780f5 (diff)
downloadlinux-stable-d432228bc7b1b3f0ed06510278ff5a77b3749fe6.tar.gz
linux-stable-d432228bc7b1b3f0ed06510278ff5a77b3749fe6.tar.bz2
linux-stable-d432228bc7b1b3f0ed06510278ff5a77b3749fe6.zip
hvcs: Use vhangup in hotplug remove
When hotplug removing an hvcs device, we need to ensure the hangup processing is done prior to exiting the remove function, so use tty_vhangup to do the hangup processing directly rather than using tty_hangup which simply schedules the hangup work for later execution. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Link: https://lore.kernel.org/r/20230203155802.404324-5-brking@linux.vnet.ibm.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/hvc/hvcs.c')
-rw-r--r--drivers/tty/hvc/hvcs.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/tty/hvc/hvcs.c b/drivers/tty/hvc/hvcs.c
index 8d40b20de277..ecf24195b1e9 100644
--- a/drivers/tty/hvc/hvcs.c
+++ b/drivers/tty/hvc/hvcs.c
@@ -810,12 +810,11 @@ static void hvcs_remove(struct vio_dev *dev)
tty_port_put(&hvcsd->port);
/*
- * The hangup is a scheduled function which will auto chain call
- * hvcs_hangup. The tty should always be valid at this time unless a
+ * The tty should always be valid at this time unless a
* simultaneous tty close already cleaned up the hvcs_struct.
*/
if (tty) {
- tty_hangup(tty);
+ tty_vhangup(tty);
tty_kref_put(tty);
}