> + tty_kref_get(hp->tty);
> spin_lock_irqsave(&hp->lock, flags);
> tty = hp->tty;
>
> @@ -830,7 +833,9 @@ int hvc_remove(struct hvc_struct *hp)
>* cleaned up the hvc_struct.
>*/
> if (tty)
> - tty_hangup(tty);
> + tty_vhangup(tty);
>
Alan pointed out a race in the code where hvc_remove is invoked. The
recent virtio_console work is the first user of hvc_remove().
Alan describes it thus:
The hvc_console assumes that a close and remove call can't occur at the
same time.
In addition tty_hangup(tty) is problematic as tty_hangup i