diff mbox series

[SRU,J,F,7/8] hvcs: Use vhangup in hotplug remove

Message ID 20240308122820.316586-8-frank.heimes@canonical.com
State New
Headers show
Series Problems with HVCS and hotplugging (LP: 2056373) | expand

Commit Message

Frank Heimes March 8, 2024, 12:28 p.m. UTC
From: Brian King <brking@linux.vnet.ibm.com>

BugLink: https://bugs.launchpad.net/bugs/2056373

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>
(cherry picked from commit d432228bc7b1b3f0ed06510278ff5a77b3749fe6)
Signed-off-by: Frank Heimes <frank.heimes@canonical.com>
---
 drivers/tty/hvc/hvcs.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/drivers/tty/hvc/hvcs.c b/drivers/tty/hvc/hvcs.c
index d3c95b2c8eca..83748197465e 100644
--- a/drivers/tty/hvc/hvcs.c
+++ b/drivers/tty/hvc/hvcs.c
@@ -840,12 +840,11 @@  static int 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);
 	}