From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48931) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGasf-0003a3-0W for qemu-devel@nongnu.org; Wed, 28 Jan 2015 17:14:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YGasb-0003MH-0J for qemu-devel@nongnu.org; Wed, 28 Jan 2015 17:14:36 -0500 Received: from mx1.redhat.com ([209.132.183.28]:52551) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGasa-0003Lq-N7 for qemu-devel@nongnu.org; Wed, 28 Jan 2015 17:14:32 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t0SMEVKj005047 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Wed, 28 Jan 2015 17:14:31 -0500 Message-ID: <54C95F45.2040607@redhat.com> Date: Wed, 28 Jan 2015 15:14:29 -0700 From: Eric Blake MIME-Version: 1.0 References: <1422300468-16216-1-git-send-email-mreitz@redhat.com> <1422300468-16216-2-git-send-email-mreitz@redhat.com> In-Reply-To: <1422300468-16216-2-git-send-email-mreitz@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="dumTC2AarkdkICentlXPcB2VkKGE1RuFL" Subject: Re: [Qemu-devel] [PATCH 01/21] block: Guard remaining unsafe blk_bs() callers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz , qemu-devel@nongnu.org Cc: Kevin Wolf , Markus Armbruster , Stefan Hajnoczi This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --dumTC2AarkdkICentlXPcB2VkKGE1RuFL Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 01/26/2015 12:27 PM, Max Reitz wrote: > There are cases where it is probably (!) not necessary to check whether= > the return value of blk_bs() is non-NULL, and those are places after > blk_new_open(). In every other place, though, there has to be some chec= k > to make sure that the return value of blk_bs() is non-NULL before it is= > used. >=20 > This patch adds that check to hopefully all of the remaining places. I did not audit for places you might have missed, but concur that these needed it. >=20 > Signed-off-by: Max Reitz > --- > blockdev.c | 18 ++++++++++-------- > hw/block/xen_disk.c | 4 +++- > 2 files changed, 13 insertions(+), 9 deletions(-) Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --dumTC2AarkdkICentlXPcB2VkKGE1RuFL 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 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJUyV9FAAoJEKeha0olJ0NqEXAH/jo7GkU3yFO2N7skb/ecEN4c P0yuSB6gfQJeaaGuk4tHzS0gEX5bKAn7UmdPuSewFVhVSZnkN0kmSggB5g7XeA+L 7c7hsWUKjasZfiXrU8QI6sZzxQC4rx/9TdTU5JrhIaQ1YMTEizA8nWNuwFtY6laO UFK33Wt1WK3xgZtRhkksq1iwovlavJ4cNC+eZs3Au2HVzbfZGfyfBEZud5fjucBE KFdMaw2sOGUIpMDiGxGU1/no7CWqy9CO5u5TdfQuHYWO0Whb4FMY1D8v+IEWujHj dsuRjIEZ58FoOMT7LG35uvDgLHryg5tyefuhmeyP62/inO0DZBdY2UaZL6R+eeM= =6HvM -----END PGP SIGNATURE----- --dumTC2AarkdkICentlXPcB2VkKGE1RuFL--