aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorsjur.brandeland@stericsson.com <sjur.brandeland@stericsson.com>2012-11-15 19:50:19 -0500
committerRusty Russell <rusty@rustcorp.com.au>2012-12-17 23:50:41 -0500
commiteb34f12b509823571e88b791ae2088280943894f (patch)
tree6f20772af6a9560ed3dc4dec3eeaa45247fcc42b /drivers/char
parent800ba5eabf13485fecbf468f6b2999608413d176 (diff)
virtio_console: Free buffers from out-queue upon close
Free pending output buffers from the virtio out-queue when host has acknowledged port_close. Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (rebased & cut down)
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/virtio_console.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
index eecb1f9e2e6b..db244b5b6c8a 100644
--- a/drivers/char/virtio_console.c
+++ b/drivers/char/virtio_console.c
@@ -1439,6 +1439,10 @@ static void remove_port_data(struct port *port)
1439 /* Remove buffers we queued up for the Host to send us data in. */ 1439 /* Remove buffers we queued up for the Host to send us data in. */
1440 while ((buf = virtqueue_detach_unused_buf(port->in_vq))) 1440 while ((buf = virtqueue_detach_unused_buf(port->in_vq)))
1441 free_buf(buf); 1441 free_buf(buf);
1442
1443 /* Free pending buffers from the out-queue. */
1444 while ((buf = virtqueue_detach_unused_buf(port->out_vq)))
1445 free_buf(buf);
1442} 1446}
1443 1447
1444/* 1448/*