[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] vhost_dev_unassign_memory() don't assert if removin
From: |
Jes . Sorensen |
Subject: |
[Qemu-devel] [PATCH] vhost_dev_unassign_memory() don't assert if removing first entry in list. |
Date: |
Fri, 23 Jul 2010 17:16:42 +0200 |
From: Jes Sorensen <address@hidden>
If removing an entry from the list which is fully included in the
region and this is the first entry in the list. In this case 'to' can
go to -1, which is perfectly valid. Don't assert() on this case.
Signed-off-by: Jes Sorensen <address@hidden>
---
hw/vhost.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/hw/vhost.c b/hw/vhost.c
index d37a66e..f30cf91 100644
--- a/hw/vhost.c
+++ b/hw/vhost.c
@@ -119,7 +119,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;
}
--
1.7.1.1
- [Qemu-devel] [PATCH] vhost_dev_unassign_memory() don't assert if removing first entry in list.,
Jes . Sorensen <=