From: Michael Roth <mdroth@linux.vnet.ibm.com>
To: qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
Michael Roth <mdroth@linux.vnet.ibm.com>,
qemu-stable@nongnu.org, Max Reitz <mreitz@redhat.com>
Subject: [Qemu-devel] [PATCH 07/40] qemu-img: Fix crash in amend invocation
Date: Wed, 21 Oct 2015 12:51:37 -0500 [thread overview]
Message-ID: <1445449930-23525-8-git-send-email-mdroth@linux.vnet.ibm.com> (raw)
In-Reply-To: <1445449930-23525-1-git-send-email-mdroth@linux.vnet.ibm.com>
From: Max Reitz <mreitz@redhat.com>
Example:
$ ./qemu-img create -f qcow2 /tmp/t.qcow2 64M
$ ./qemu-img amend -f qcow2 -o backing_file=/tmp/t.qcow2, -o help \
/tmp/t.qcow2
This should not crash. This actually is tested by iotest 082, but not
caught due to the segmentation fault being silent (which is something
that needs to be fixed, too).
Reported-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Cc: qemu-stable <qemu-stable@nongnu.org>
Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
(cherry picked from commit e814dffcc9810ed77fe99081be9751b620a894c4)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
qemu-img.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/qemu-img.c b/qemu-img.c
index 75f4ee4..6ff4e85 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -2931,7 +2931,7 @@ static int img_amend(int argc, char **argv)
if (!is_valid_option_list(optarg)) {
error_report("Invalid option list: %s", optarg);
ret = -1;
- goto out;
+ goto out_no_progress;
}
if (!options) {
options = g_strdup(optarg);
@@ -3031,6 +3031,7 @@ static int img_amend(int argc, char **argv)
out:
qemu_progress_end();
+out_no_progress:
blk_unref(blk);
qemu_opts_del(opts);
qemu_opts_free(create_opts);
--
1.9.1
next prev parent reply other threads:[~2015-10-21 17:55 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-21 17:51 [Qemu-devel] [PATCH 00/40] Patch Round-up for stable 2.4.1, freeze on 2015-10-29 Michael Roth
2015-10-21 17:51 ` [Qemu-devel] [PATCH 01/40] scsi-disk: Fix assertion failure on WRITE SAME Michael Roth
2015-10-21 17:51 ` [Qemu-devel] [PATCH 02/40] mirror: Fix coroutine reentrance Michael Roth
2015-10-21 17:51 ` [Qemu-devel] [PATCH 03/40] target-arm/arm-semi.c: Fix broken SYS_WRITE0 via gdb Michael Roth
2015-10-21 17:51 ` [Qemu-devel] [PATCH 04/40] block/iscsi: validate block size returned from target Michael Roth
2015-10-21 17:51 ` [Qemu-devel] [PATCH 05/40] exec-all: Translate TCI return addresses backwards too Michael Roth
2015-10-21 17:51 ` [Qemu-devel] [PATCH 06/40] block/nfs: fix calculation of allocated file size Michael Roth
2015-10-21 17:51 ` Michael Roth [this message]
2015-10-21 17:51 ` [Qemu-devel] [PATCH 08/40] mac_dbdma: always clear FLUSH bit once DBDMA channel flush is complete Michael Roth
2015-10-21 17:51 ` [Qemu-devel] [PATCH 09/40] vhost-scsi: fix wrong vhost-scsi firmware path Michael Roth
2015-10-21 17:51 ` [Qemu-devel] [PATCH 10/40] scripts/dump-guest-memory.py: fix after RAMBlock change Michael Roth
2015-10-21 17:51 ` [Qemu-devel] [PATCH 11/40] PPC: E500: Update u-boot to commit 79c884d7e4 Michael Roth
2015-10-21 17:51 ` [Qemu-devel] [PATCH 12/40] s390x/css: start with cleared cstat/dstat Michael Roth
2015-10-21 17:51 ` [Qemu-devel] [PATCH 13/40] rtl8139: Fix receive buffer overflow check Michael Roth
2015-10-21 17:51 ` [Qemu-devel] [PATCH 14/40] rtl8139: Do not consume the packet during overflow in standard mode Michael Roth
2015-10-21 17:51 ` [Qemu-devel] [PATCH 15/40] cpus.c: qemu_mutex_lock_iothread fix race condition at cpu thread init Michael Roth
2015-10-21 17:51 ` [Qemu-devel] [PATCH 16/40] virtio dataplane: adapt dataplane for virtio Version 1 Michael Roth
2015-10-21 17:51 ` [Qemu-devel] [PATCH 17/40] target-arm: Share all common TCG temporaries Michael Roth
2015-10-21 17:51 ` [Qemu-devel] [PATCH 18/40] qcow2: Make size_to_clusters() return uint64_t Michael Roth
2015-10-21 17:51 ` [Qemu-devel] [PATCH 19/40] ide: fix ATAPI command permissions Michael Roth
2015-10-21 17:51 ` [Qemu-devel] [PATCH 20/40] gtk: use setlocale() for LC_MESSAGES only Michael Roth
2015-10-21 17:51 ` [Qemu-devel] [PATCH 21/40] spapr_pci: fix device tree props for MSI/MSI-X Michael Roth
2015-10-21 17:51 ` [Qemu-devel] [PATCH 22/40] nbd: release exp->blk after all clients are closed Michael Roth
2015-10-21 17:51 ` [Qemu-devel] [PATCH 23/40] slirp: Fix non blocking connect for w32 Michael Roth
2015-10-21 17:51 ` [Qemu-devel] [PATCH 24/40] ide: unify io_buffer_offset increments Michael Roth
2015-10-21 17:51 ` [Qemu-devel] [PATCH 25/40] qom: Do not reuse errp after a possible error Michael Roth
2015-10-21 17:51 ` [Qemu-devel] [PATCH 26/40] qom: Fix invalid error check in property_get_str() Michael Roth
2015-10-21 17:51 ` [Qemu-devel] [PATCH 27/40] tcg/mips: Fix clobbering of qemu_ld inputs Michael Roth
2015-10-21 17:51 ` [Qemu-devel] [PATCH 28/40] target-ppc: fix vcipher, vcipherlast, vncipherlast and vpermxor Michael Roth
2015-10-21 17:51 ` [Qemu-devel] [PATCH 29/40] target-ppc: fix xscmpodp and xscmpudp decoding Michael Roth
2015-10-21 17:52 ` [Qemu-devel] [PATCH 30/40] virtio: avoid leading underscores for helpers Michael Roth
2015-10-21 17:52 ` [Qemu-devel] [PATCH 31/40] virtio-net: unbreak self announcement and guest offloads after migration Michael Roth
2015-10-21 17:52 ` [Qemu-devel] [PATCH 32/40] vmxnet3: Drop net_vmxnet3_info.can_receive Michael Roth
2015-10-21 17:52 ` [Qemu-devel] [PATCH 33/40] qmp: Fix device-list-properties not to crash for abstract device Michael Roth
2015-10-21 17:52 ` [Qemu-devel] [PATCH 34/40] qdev: Protect device-list-properties against broken devices Michael Roth
2015-10-21 17:52 ` [Qemu-devel] [PATCH 35/40] Revert "qdev: Use qdev_get_device_class() for -device <type>, help" Michael Roth
2015-10-21 17:52 ` [Qemu-devel] [PATCH 36/40] misc: zynq_slcr: Fix MMIO writes Michael Roth
2015-10-21 17:52 ` [Qemu-devel] [PATCH 37/40] s390x/kvm: Fix vector validity bit in device machine checks Michael Roth
2015-10-21 17:52 ` [Qemu-devel] [PATCH 38/40] util/qemu-config: fix missing machine command line options Michael Roth
2015-10-21 17:52 ` [Qemu-devel] [PATCH 39/40] Migration: Generate the completed event only when we complete Michael Roth
2015-10-21 17:52 ` [Qemu-devel] [PATCH 40/40] virtio-input: ignore events until the guest driver is ready Michael Roth
2015-10-21 18:05 ` [Qemu-devel] [PATCH 00/40] Patch Round-up for stable 2.4.1, freeze on 2015-10-29 Cole Robinson
2015-10-21 18:43 ` Michael Roth
2015-10-22 17:36 ` Cole Robinson
2015-10-22 8:01 ` Markus Armbruster
2015-10-29 19:19 ` Michael Roth
2015-10-29 20:53 ` Denis V. Lunev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1445449930-23525-8-git-send-email-mdroth@linux.vnet.ibm.com \
--to=mdroth@linux.vnet.ibm.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).