From ea08eeccae9297f7aabd2ef7f0c2517ac4549acc Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Tue, 20 Feb 2024 01:18:26 +0000
Subject: [PATCH] write in 30M
---
kernel/drivers/vhost/vringh.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/kernel/drivers/vhost/vringh.c b/kernel/drivers/vhost/vringh.c
index 5a0340c..48f4ec2 100644
--- a/kernel/drivers/vhost/vringh.c
+++ b/kernel/drivers/vhost/vringh.c
@@ -1077,7 +1077,7 @@
struct vhost_iotlb_map *map;
struct vhost_iotlb *iotlb = vrh->iotlb;
int ret = 0;
- u64 s = 0;
+ u64 s = 0, last = addr + len - 1;
while (len > s) {
u64 size, pa, pfn;
@@ -1087,8 +1087,7 @@
break;
}
- map = vhost_iotlb_itree_first(iotlb, addr,
- addr + len - 1);
+ map = vhost_iotlb_itree_first(iotlb, addr, last);
if (!map || map->start > addr) {
ret = -EINVAL;
break;
--
Gitblit v1.6.2