[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PULL 01/15] stream: fix crash in stream_start() when block
From: |
Kevin Wolf |
Subject: |
[Qemu-block] [PULL 01/15] stream: fix crash in stream_start() when block_job_create() fails |
Date: |
Mon, 29 May 2017 17:06:40 +0200 |
From: Alberto Garcia <address@hidden>
The code that tries to reopen a BlockDriverState in stream_start()
when the creation of a new block job fails crashes because it attempts
to dereference a pointer that is known to be NULL.
This is a regression introduced in a170a91fd3eab6155da39e740381867e,
likely because the code was copied from stream_complete().
Cc: address@hidden
Reported-by: Kashyap Chamarthy <address@hidden>
Signed-off-by: Alberto Garcia <address@hidden>
Tested-by: Kashyap Chamarthy <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
block/stream.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/stream.c b/block/stream.c
index 0113710..52d329f 100644
--- a/block/stream.c
+++ b/block/stream.c
@@ -280,6 +280,6 @@ void stream_start(const char *job_id, BlockDriverState *bs,
fail:
if (orig_bs_flags != bdrv_get_flags(bs)) {
- bdrv_reopen(bs, s->bs_flags, NULL);
+ bdrv_reopen(bs, orig_bs_flags, NULL);
}
}
--
1.8.3.1
- [Qemu-block] [PULL 00/15] Block layer patches, Kevin Wolf, 2017/05/29
- [Qemu-block] [PULL 02/15] qemu-iotests: Test streaming with missing job ID, Kevin Wolf, 2017/05/29
- [Qemu-block] [PULL 01/15] stream: fix crash in stream_start() when block_job_create() fails,
Kevin Wolf <=
- [Qemu-block] [PULL 03/15] iotests: 147: Don't test inet6 if not available, Kevin Wolf, 2017/05/29
- [Qemu-block] [PULL 05/15] mirror: Drop permissions on s->target on completion, Kevin Wolf, 2017/05/29
- [Qemu-block] [PULL 04/15] nvme: Add support for Controller Memory Buffers, Kevin Wolf, 2017/05/29
- [Qemu-block] [PULL 07/15] qemu-img: Fix documentation of convert, Kevin Wolf, 2017/05/29
- [Qemu-block] [PULL 08/15] qemu-img: add support for --object with 'dd' command, Kevin Wolf, 2017/05/29
- [Qemu-block] [PULL 06/15] qcow2: remove extra local_error variable, Kevin Wolf, 2017/05/29
- [Qemu-block] [PULL 09/15] qemu-img: fix --image-opts usage with dd command, Kevin Wolf, 2017/05/29
- [Qemu-block] [PULL 10/15] qemu-img: introduce --target-image-opts for 'convert' command, Kevin Wolf, 2017/05/29
- [Qemu-block] [PULL 12/15] qemu-img: Fix leakage of options on error, Kevin Wolf, 2017/05/29
- [Qemu-block] [PULL 11/15] qemu-img: copy *key-secret opts when opening newly created files, Kevin Wolf, 2017/05/29