Skip to content

vhost: fix ranges when call vhost_iotlb_itree_first()

Stefano Garzarella kvm lkml netdev virtualization 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 0 repliesNew
  2. v12 patches 4 repliesSuperseded

Changes in v2 from the cover letter

- Patch 2: Replaced Fixes tag with the right one [Jason]

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2vringh: fix range used in iotlb_translate()drivers/vhost/vringh.c+2 -30 replies
2/2vhost: fix range used in translate_desc()drivers/vhost/vhost.c+2 -20 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchJason Wang
1/2A-b
2/2A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/2] vhost: fix ranges when call vhost_iotlb_itree_first()

v2:
- Patch 2: Replaced Fixes tag with the right one [Jason]

v1: https://lore.kernel.org/virtualization/[email protected]/

While I was working on vringh to support VA in vringh_*_iotlb() I saw that the range we use in iotlb_translate() when we call vhost_iotlb_itree_first() was not correct IIUC.
So I looked at all the calls and found that in vhost.c as well.

I didn't observe a failure and I don't have a reproducer because I noticed the problem by looking at the code.

Maybe we didn't have a problem, because a shorter range was being returned anyway and the loop stopped taking into account the total amount of bytes translated, but I think it's better to fix.

Thanks,
Stefano

Stefano Garzarella (2):
vringh: fix range used in iotlb_translate()
vhost: fix range used in translate_desc()

 drivers/vhost/vhost.c  | 4 ++--
 drivers/vhost/vringh.c | 5 ++---
 2 files changed, 4 insertions(+), 5 deletions(-)
Signature · 6 lines
2.38.1

_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization