hguemar pushed to qemu (f21). "Reintroduce upstream patch fixing some qemu-img conversion errors (RHBZ#1200043)"

notifications at fedoraproject.org notifications at fedoraproject.org
Tue Apr 14 14:20:26 UTC 2015


>From 950803f8672d16d35214831df503f20b4965a08f Mon Sep 17 00:00:00 2001
From: Haikel Guemar <hguemar at fedoraproject.org>
Date: Tue, 14 Apr 2015 16:20:00 +0200
Subject: Reintroduce upstream patch fixing some qemu-img conversion errors
 (RHBZ#1200043)


diff --git a/0017-block-Fix-max-nb_sectors-in-bdrv_make_zero.patch b/0017-block-Fix-max-nb_sectors-in-bdrv_make_zero.patch
new file mode 100644
index 0000000..6150722
--- /dev/null
+++ b/0017-block-Fix-max-nb_sectors-in-bdrv_make_zero.patch
@@ -0,0 +1,34 @@
+From 619943278aa5b1f500d6f4b486b4581ed1f6143f Mon Sep 17 00:00:00 2001
+From: Fam Zheng <famz at redhat.com>
+Date: Mon, 10 Nov 2014 15:07:44 +0800
+Subject: [PATCH] block: Fix max nb_sectors in bdrv_make_zero
+
+In bdrv_rw_co we report -EINVAL for nb_sectors > INT_MAX /
+BDRV_SECTOR_SIZE, so a caller shouldn't exceed it.
+
+Signed-off-by: Fam Zheng <famz at redhat.com>
+Reviewed-by: Markus Armbruster <armbru at redhat.com>
+Message-id: 1415603264-21497-1-git-send-email-famz at redhat.com
+Signed-off-by: Stefan Hajnoczi <stefanha at redhat.com>
+---
+ block.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/block.c b/block.c
+index ed87b7e..8dc841c 100644
+--- a/block.c
++++ b/block.c
+@@ -2834,8 +2834,8 @@ int bdrv_make_zero(BlockDriverState *bs, BdrvRequestFlags flags)
+         if (nb_sectors <= 0) {
+             return 0;
+         }
+-        if (nb_sectors > INT_MAX) {
+-            nb_sectors = INT_MAX;
++        if (nb_sectors > INT_MAX / BDRV_SECTOR_SIZE) {
++            nb_sectors = INT_MAX / BDRV_SECTOR_SIZE;
+         }
+         ret = bdrv_get_block_status(bs, sector_num, nb_sectors, &n);
+         if (ret < 0) {
+-- 
+2.3.5
+
diff --git a/qemu.spec b/qemu.spec
index c1f774c..cdd4007 100644
--- a/qemu.spec
+++ b/qemu.spec
@@ -152,7 +152,7 @@
 Summary: QEMU is a FAST! processor emulator
 Name: qemu
 Version: 2.1.3
-Release: 5%{?dist}
+Release: 6%{?dist}
 Epoch: 2
 License: GPLv2+ and LGPLv2+ and BSD
 Group: Development/Tools
@@ -219,6 +219,8 @@ Patch0014: 0014-block-vdi-Add-locking-for-parallel-requests.patch
 # decoder (bz #1205051, bz #1199572)
 Patch0015: 0015-CVE-2015-1779-incrementally-decode-websocket-frames.patch
 Patch0016: 0016-CVE-2015-1779-limit-size-of-HTTP-headers-from-websoc.patch
+# Fix  qemu-img error (bz #1200043)
+Patch0017: 0017-block-Fix-max-nb_sectors-in-bdrv_make_zero.patch
 
 BuildRequires: SDL2-devel
 BuildRequires: zlib-devel
@@ -772,6 +774,8 @@ CAC emulation development files.
 # decoder (bz #1205051, bz #1199572)
 %patch0015 -p1
 %patch0016 -p1
+# Fix  qemu-img error (bz #1200043)
+%patch0017 -p1
 
 
 %build
@@ -1552,6 +1556,9 @@ getent passwd qemu >/dev/null || \
 %endif
 
 %changelog
+* Tue Apr 14 2015 Haïkel Guémar <hguemar at fedoraproject.org> - 2:2.1.3-6
+- Reintroduce upstream patch fixing some qemu-img conversion errors (RHBZ#1200043)
+
 * Thu Apr 02 2015 Cole Robinson <crobinso at redhat.com> - 2:2.1.3-5
 - CVE-2015-1779 vnc: insufficient resource limiting in VNC websockets decoder
   (bz #1205051, bz #1199572)
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/qemu.git/commit/?h=f21&id=950803f8672d16d35214831df503f20b4965a08f


More information about the scm-commits mailing list