|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] Fix a BUG_ON issue
The 'idx' can equal to the max number of vCPUs, fix it.
Signed-off-by: Feng Wu <feng.wu@xxxxxxxxx>
---
xen/drivers/passthrough/io.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xen/drivers/passthrough/io.c b/xen/drivers/passthrough/io.c
index 9e6b46c..66577b6 100644
--- a/xen/drivers/passthrough/io.c
+++ b/xen/drivers/passthrough/io.c
@@ -243,7 +243,7 @@ static struct vcpu *vector_hashing_dest(const struct domain
*d,
for ( i = 0; i <= mod; i++ )
{
idx = find_next_bit(dest_vcpu_bitmap, d->max_vcpus, idx) + 1;
- BUG_ON(idx >= d->max_vcpus);
+ BUG_ON(idx > d->max_vcpus);
}
dest = d->vcpu[idx - 1];
--
2.1.0
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |