[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 02/34] quorum: fix segfault when read fails in fifo m
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PULL 02/34] quorum: fix segfault when read fails in fifo mode |
Date: |
Mon, 22 Feb 2016 17:32:20 +0100 |
From: Changlong Xie <address@hidden>
Signed-off-by: Wen Congyang <address@hidden>
Signed-off-by: Changlong Xie <address@hidden>
Reviewed-by: Alberto Garcia <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
block/quorum.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/block/quorum.c b/block/quorum.c
index a5ae4b8..11cc60b 100644
--- a/block/quorum.c
+++ b/block/quorum.c
@@ -286,7 +286,8 @@ static void quorum_aio_cb(void *opaque, int ret)
if (acb->is_read && s->read_pattern == QUORUM_READ_PATTERN_FIFO) {
/* We try to read next child in FIFO order if we fail to read */
- if (ret < 0 && ++acb->child_iter < s->num_children) {
+ if (ret < 0 && (acb->child_iter + 1) < s->num_children) {
+ acb->child_iter++;
read_fifo_child(acb);
return;
}
--
1.8.3.1
- [Qemu-devel] [PULL 00/34] Block layer patches, Kevin Wolf, 2016/02/22
- [Qemu-devel] [PULL 01/34] qemu-img: initialize MapEntry object, Kevin Wolf, 2016/02/22
- [Qemu-devel] [PULL 02/34] quorum: fix segfault when read fails in fifo mode,
Kevin Wolf <=
- [Qemu-devel] [PULL 03/34] spec: add qcow2 bitmaps extension specification, Kevin Wolf, 2016/02/22
- [Qemu-devel] [PULL 07/34] qemu-io: allow specifying image as a set of options args, Kevin Wolf, 2016/02/22
- [Qemu-devel] [PULL 10/34] qemu-nbd: don't overlap long option values with short options, Kevin Wolf, 2016/02/22
- [Qemu-devel] [PULL 12/34] qemu-io: use no_argument/required_argument constants, Kevin Wolf, 2016/02/22
- [Qemu-devel] [PULL 13/34] block migration: Activate image on destination before writing to it, Kevin Wolf, 2016/02/22
- [Qemu-devel] [PULL 04/34] block: Fix -incoming with snapshot=on, Kevin Wolf, 2016/02/22
- [Qemu-devel] [PULL 15/34] throttle: Make throttle_conflicting() set errp, Kevin Wolf, 2016/02/22
- [Qemu-devel] [PULL 09/34] qemu-img: allow specifying image as a set of options args, Kevin Wolf, 2016/02/22
- [Qemu-devel] [PULL 16/34] throttle: Make throttle_max_is_missing_limit() set errp, Kevin Wolf, 2016/02/22
- [Qemu-devel] [PULL 06/34] qemu-img: add support for --object command line arg, Kevin Wolf, 2016/02/22