aboutsummaryrefslogtreecommitdiff
path: root/qga/commands-linux.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2023-04-07 17:33:00 +0200
committerKevin Wolf <kwolf@redhat.com>2023-04-11 16:40:53 +0200
commit2c5451ca523fc2b757e1e5b4e0b9fc84dbd58f97 (patch)
treeb31834074a21b549780e99807535bb65dbb10994 /qga/commands-linux.c
parent8c6f27e7d85a794698eb1cd32c58df28cece50d1 (diff)
migration/block: replace uses of blk_nb_sectors that do not check result
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> Message-Id: <20230407153303.391121-6-pbonzini@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'qga/commands-linux.c')
0 files changed, 0 insertions, 0 deletions