From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:52773) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKWwz-0002S2-3L for qemu-devel@nongnu.org; Tue, 26 Mar 2013 12:42:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UKWwu-0006MF-Az for qemu-devel@nongnu.org; Tue, 26 Mar 2013 12:42:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50639) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKWwu-0006M7-1z for qemu-devel@nongnu.org; Tue, 26 Mar 2013 12:42:12 -0400 Message-ID: <5151CF89.5060706@redhat.com> Date: Tue, 26 Mar 2013 10:40:41 -0600 From: Eric Blake MIME-Version: 1.0 References: <1364314072-2474-1-git-send-email-stefanha@redhat.com> <1364314072-2474-5-git-send-email-stefanha@redhat.com> In-Reply-To: <1364314072-2474-5-git-send-email-stefanha@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="----enig2REQXOIHLBAFQXXQIILVT" Subject: Re: [Qemu-devel] [PATCH 4/4] chardev: clear O_NONBLOCK on SCM_RIGHTS file descriptors List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Anthony Liguori , david.pravec@nethost.cz, Juan Quintela , mprivozn@redhat.com, Corey Bryant , qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2REQXOIHLBAFQXXQIILVT Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 03/26/2013 10:07 AM, Stefan Hajnoczi wrote: > When we receive a file descriptor over a UNIX domain socket the > O_NONBLOCK flag is preserved. Clear the O_NONBLOCK flag and rely on > QEMU file descriptor users like migration, SPICE, VNC, block layer, and= > others to set non-blocking only when necessary. >=20 > This change ensures we don't accidentally expose O_NONBLOCK in the QMP > API. QMP clients should not need to get the non-blocking state > "correct". >=20 > A recent real-world example was when libvirt passed a non-blocking TCP > socket for migration where we expected a blocking socket. The source > QEMU produced a corrupted migration stream since its code did not cope > with non-blocking sockets. >=20 > Signed-off-by: Stefan Hajnoczi > --- > qemu-char.c | 3 +++ > 1 file changed, 3 insertions(+) Reviewed-by: Eric Blake Covers both 'getfd' and 'add-fd' paths. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org ------enig2REQXOIHLBAFQXXQIILVT Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJRUc+JAAoJEKeha0olJ0NqHCsH/idqEFbwDf+5yUqeuzVO7lG1 XFpYAp83VEK6WpTrNiIpxpAkZIlNgWrkh3+W6KJJHsZb/P0wP1wWbQ3Fs9GEXcfI r+Lcx+eTgINLrAp5NwIXVBUKU5yTn3j1OWbYr+jMabLQmDX724vPST4cPYmJ0zit SIvZ+o/DlrkuA04RoHPBuLSBW2AWBaciV0sR/XlEdOZo/bo7TUvkk9V80rKNZO5B R3BvjfEoAu7YBMfuOTokjdW0qOy4goS1Sfk4H7eiLPAl5uQm4qNXQRrwDwo1N0Tx t5Ai+6spz08JAL1O/cx/eAj24GAFof1y4G68zGTnbphRbB+vcOHO9S8YC4VBzGY= =lhgs -----END PGP SIGNATURE----- ------enig2REQXOIHLBAFQXXQIILVT--