Commit d432228b authored by Brian King's avatar Brian King Committed by Greg Kroah-Hartman

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: default avatarBrian King <brking@linux.vnet.ibm.com>
Link: https://lore.kernel.org/r/20230203155802.404324-5-brking@linux.vnet.ibm.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3a8d3b36
...@@ -810,12 +810,11 @@ static void hvcs_remove(struct vio_dev *dev) ...@@ -810,12 +810,11 @@ static void hvcs_remove(struct vio_dev *dev)
tty_port_put(&hvcsd->port); tty_port_put(&hvcsd->port);
/* /*
* The hangup is a scheduled function which will auto chain call * The tty should always be valid at this time unless a
* hvcs_hangup. The tty should always be valid at this time unless a
* simultaneous tty close already cleaned up the hvcs_struct. * simultaneous tty close already cleaned up the hvcs_struct.
*/ */
if (tty) { if (tty) {
tty_hangup(tty); tty_vhangup(tty);
tty_kref_put(tty); tty_kref_put(tty);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment