From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51164) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1jkz-0000Im-Lg for qemu-devel@nongnu.org; Wed, 25 Nov 2015 18:45:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a1jkx-0005EQ-01 for qemu-devel@nongnu.org; Wed, 25 Nov 2015 18:45:49 -0500 Received: from resqmta-po-01v.sys.comcast.net ([2001:558:fe16:19:96:114:154:160]:45148) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1jkw-0005EI-Q6 for qemu-devel@nongnu.org; Wed, 25 Nov 2015 18:45:46 -0500 References: <1448491660-11890-1-git-send-email-mdroth@linux.vnet.ibm.com> <1448491660-11890-4-git-send-email-mdroth@linux.vnet.ibm.com> From: Eric Blake Message-ID: <56564828.2060503@redhat.com> Date: Wed, 25 Nov 2015 16:45:44 -0700 MIME-Version: 1.0 In-Reply-To: <1448491660-11890-4-git-send-email-mdroth@linux.vnet.ibm.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="GXXrkTNaFx3NOf8Hmpolg5Nj3HUKAI15c" Subject: Re: [Qemu-devel] [PULL for-2.5 3/6] qga: flush explicitly when needed List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Roth , qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, =?UTF-8?Q?Marc-Andr=c3=a9_Lureau?= This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --GXXrkTNaFx3NOf8Hmpolg5Nj3HUKAI15c Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 11/25/2015 03:47 PM, Michael Roth wrote: > From: Marc-Andr=C3=A9 Lureau >=20 > According to the specification: > http://pubs.opengroup.org/onlinepubs/9699919799/functions/fopen.html >=20 > "the application shall ensure that output is not directly followed by > input without an intervening call to fflush() or to a file positioning > function (fseek(), fsetpos(), or rewind()), and input is not directly > followed by output without an intervening call to a file positioning > function, unless the input operation encounters end-of-file." >=20 > Without this change, an fwrite() followed by an fread() may lose the > previously written content, as shown in the following test. >=20 > Fixes: > https://bugzilla.redhat.com/show_bug.cgi?id=3D1210246 >=20 > Reviewed-by: Eric Blake > * don't confuse {write,read}() with f{write,read}() in > commit msg (Laszlo) > Signed-off-by: Michael Roth > --- Looks like you lost Marc-Andre's S-o-b :( --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --GXXrkTNaFx3NOf8Hmpolg5Nj3HUKAI15c Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJWVkgoAAoJEKeha0olJ0Nqhx4H/RWjp5gZXZ28ywkX+D/KhJJA +9pL2K7e1GXL71w04Vh7u1byNboFlWxEjkqMHoC7HFESluUtkkQ4Ef5WO6gZLlwt qkyLU4+nPaGIKfOl3MlacHeoROvfjOdI6MAOIS/M1Gd9ET/U6PPh+7cwsX/8diKS 94HyqmE7eEesvdR17mQLX0lKL6bBb7YHf70lRNW7UYAxROByu8zr6gcEpk8bdCNk nzsZm/4CYdI+H1bv1BdwchNUwv2755yuk/IYl4w9+jY0mWmZkPw+goeuYSf+WDot u8NZ4BxCxtMBak3vIf+2hzPE2VzSm8i1b5o5Tg5jx0JWEThtYFOqU8dopahv6qA= =wr+n -----END PGP SIGNATURE----- --GXXrkTNaFx3NOf8Hmpolg5Nj3HUKAI15c--