diff options
-rw-r--r-- | drivers/char/virtio_console.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c index e1d382b15532..92f1f65d57a9 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c | |||
@@ -528,6 +528,10 @@ static ssize_t fill_readbuf(struct port *port, char *out_buf, size_t out_count, | |||
528 | /* The condition that must be true for polling to end */ | 528 | /* The condition that must be true for polling to end */ |
529 | static bool will_read_block(struct port *port) | 529 | static bool will_read_block(struct port *port) |
530 | { | 530 | { |
531 | if (!port->guest_connected) { | ||
532 | /* Port got hot-unplugged. Let's exit. */ | ||
533 | return false; | ||
534 | } | ||
531 | return !port_has_data(port) && port->host_connected; | 535 | return !port_has_data(port) && port->host_connected; |
532 | } | 536 | } |
533 | 537 | ||