From f8a1c12ff1066fb997571bb48a46040801a9c146 Mon Sep 17 00:00:00 2001 From: Amit Shah Date: Thu, 2 Sep 2010 18:11:43 +0530 Subject: [PATCH] --- yaml --- r: 211645 b: refs/heads/master c: 3709ea7ae7d698b428576c2db0bbb6e08a18cf12 h: refs/heads/master i: 211643: da64643ef6f62b1bcb17ba0f777feaea210c67be v: v3 --- [refs] | 2 +- trunk/drivers/char/virtio_console.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 5dabd59bb9c2..425508425070 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 84ec06c59a14d0941dd58ca6793b24a7e86b3b85 +refs/heads/master: 3709ea7ae7d698b428576c2db0bbb6e08a18cf12 diff --git a/trunk/drivers/char/virtio_console.c b/trunk/drivers/char/virtio_console.c index e1d382b15532..92f1f65d57a9 100644 --- a/trunk/drivers/char/virtio_console.c +++ b/trunk/drivers/char/virtio_console.c @@ -528,6 +528,10 @@ static ssize_t fill_readbuf(struct port *port, char *out_buf, size_t out_count, /* The condition that must be true for polling to end */ static bool will_read_block(struct port *port) { + if (!port->guest_connected) { + /* Port got hot-unplugged. Let's exit. */ + return false; + } return !port_has_data(port) && port->host_connected; }