[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] Fixed consoled race condition.
# HG changeset patch # User cl349@xxxxxxxxxxxxxxxxxxxx # Node ID 4d018790ff8a17e6fcfce4e274fd4b9fac0ab568 # Parent 0fad07d67e758290d5921a82f6099fa6c186099f Fixed consoled race condition. Signed-off by: Andy Peace <andrew.peace@xxxxxxxxxxxxx> Signed-off-by: Christian Limpach <Christian.Limpach@xxxxxxxxxxxx> diff -r 0fad07d67e75 -r 4d018790ff8a tools/console/daemon/io.c --- a/tools/console/daemon/io.c Tue Sep 13 10:05:49 2005 +++ b/tools/console/daemon/io.c Tue Sep 13 10:13:52 2005 @@ -87,6 +87,7 @@ struct buffer *buffer = &dom->buffer; struct ring_head *ring = (struct ring_head *)dom->page; size_t size; + u32 oldcons; while ((size = ring->prod - ring->cons) != 0) { if ((buffer->capacity - buffer->size) < size) { @@ -98,7 +99,8 @@ } } - while (ring->cons < ring->prod) { + oldcons = ring->cons; + while (ring->cons < (oldcons + size)) { buffer->data[buffer->size] = ring->buf[XENCONS_IDX(ring->cons)]; buffer->size++; _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |