[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 5/8] migration/block: replace uses of blk_nb_sectors that do
From: |
Eric Blake |
Subject: |
Re: [PATCH 5/8] migration/block: replace uses of blk_nb_sectors that do not check result |
Date: |
Fri, 7 Apr 2023 14:49:41 -0500 |
User-agent: |
NeoMutt/20230322 |
On Fri, Apr 07, 2023 at 05:33:00PM +0200, Paolo Bonzini wrote:
> Uses of blk_nb_sectors must check whether the result is negative.
> Otherwise, underflow can happen. Fortunately, alloc_aio_bitmap()
> and bmds_aio_inflight() both have an alternative way to retrieve the
> number of sectors in the file.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> migration/block.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
- [PATCH 4/8] block: remove has_variable_length from BlockDriver, (continued)
- [PATCH 4/8] block: remove has_variable_length from BlockDriver, Paolo Bonzini, 2023/04/07
- [PATCH 6/8] block-backend: inline bdrv_co_get_geometry, Paolo Bonzini, 2023/04/07
- [PATCH 7/8] block-backend: ignore inserted state in blk_co_nb_sectors, Paolo Bonzini, 2023/04/07
- [PATCH 8/8] block, block-backend: write some hot coroutine wrappers by hand, Paolo Bonzini, 2023/04/07
- [PATCH 5/8] migration/block: replace uses of blk_nb_sectors that do not check result, Paolo Bonzini, 2023/04/07
- Re: [PATCH 5/8] migration/block: replace uses of blk_nb_sectors that do not check result,
Eric Blake <=
- Re: [PATCH 8.0 regression 0/8] block: remove bdrv_co_get_geometry coroutines from I/O hot path, Kevin Wolf, 2023/04/11