mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
vhost: remove an incorrect assert
The 'to' can go negative when the first region gets removed (it gets incremented by to 0 immediately afterward), which makes the assertion fail. Nothing breaks if to < 0 here so just remove the assert. Tested-by: David Ahern <daahern@cisco.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
43e86c8f5b
commit
cb4b4fde82
1 changed files with 0 additions and 1 deletions
|
@ -120,7 +120,6 @@ static void vhost_dev_unassign_memory(struct vhost_dev *dev,
|
|||
if (start_addr <= reg->guest_phys_addr && memlast >= reglast) {
|
||||
--dev->mem->nregions;
|
||||
--to;
|
||||
assert(to >= 0);
|
||||
++overlap_middle;
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue