[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 01/21] block: Guard remaining unsafe blk_bs() ca
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH 01/21] block: Guard remaining unsafe blk_bs() callers |
Date: |
Wed, 28 Jan 2015 15:14:29 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 |
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 check
> to make sure that the return value of blk_bs() is non-NULL before it is
> used.
>
> 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.
>
> Signed-off-by: Max Reitz <address@hidden>
> ---
> blockdev.c | 18 ++++++++++--------
> hw/block/xen_disk.c | 4 +++-
> 2 files changed, 13 insertions(+), 9 deletions(-)
Reviewed-by: Eric Blake <address@hidden>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH 00/20] block: Rework bdrv_close_all(), Max Reitz, 2015/01/26
- [Qemu-devel] [PATCH 06/21] block: Use blk_remove_bs() in blk_delete(), Max Reitz, 2015/01/26
- [Qemu-devel] [PATCH 07/21] blockdev: Use blk_remove_bs() in do_drive_del(), Max Reitz, 2015/01/26
- [Qemu-devel] [PATCH 01/21] block: Guard remaining unsafe blk_bs() callers, Max Reitz, 2015/01/26
- Re: [Qemu-devel] [PATCH 01/21] block: Guard remaining unsafe blk_bs() callers,
Eric Blake <=
- [Qemu-devel] [PATCH 08/21] block: Make bdrv_close() static, Max Reitz, 2015/01/26
- [Qemu-devel] [PATCH 03/21] block: Add bdrv_close_all() notifiers, Max Reitz, 2015/01/26
- [Qemu-devel] [PATCH 09/21] block: Add blk_name_taken(), Max Reitz, 2015/01/26
- [Qemu-devel] [PATCH 04/21] block: Add bdrv_close_all() handlers, Max Reitz, 2015/01/26