qemu-devel
[Top][All Lists]
Advanced

[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

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]