diff options
author | Eric Auger <[email protected]> | 2023-09-27 16:05:44 +0200 |
---|---|---|
committer | Michael S. Tsirkin <[email protected]> | 2023-10-18 11:29:56 -0400 |
commit | ca50ec377c2e94b0a9f8735de2856cd0f13beab4 (patch) | |
tree | 660f91c1ff5983868a8e9b03244b862f8b6b29f7 /lib/test_fortify/write_overflow-memset.c | |
parent | abb0dcf9938c93f765abf8cb45567cadef0af6b2 (diff) |
vhost: Allow null msg.size on VHOST_IOTLB_INVALIDATE
Commit e2ae38cf3d91 ("vhost: fix hung thread due to erroneous iotlb
entries") Forbade vhost iotlb msg with null size to prevent entries
with size = start = 0 and last = ULONG_MAX to end up in the iotlb.
Then commit 95932ab2ea07 ("vhost: allow batching hint without size")
only applied the check for VHOST_IOTLB_UPDATE and VHOST_IOTLB_INVALIDATE
message types to fix a regression observed with batching hit.
Still, the introduction of that check introduced a regression for
some users attempting to invalidate the whole ULONG_MAX range by
setting the size to 0. This is the case with qemu/smmuv3/vhost
integration which does not work anymore. It Looks safe to partially
revert the original commit and allow VHOST_IOTLB_INVALIDATE messages
with null size. vhost_iotlb_del_range() will compute a correct end
iova. Same for vhost_vdpa_iotlb_unmap().
Signed-off-by: Eric Auger <[email protected]>
Fixes: e2ae38cf3d91 ("vhost: fix hung thread due to erroneous iotlb entries")
Cc: [email protected] # v5.17+
Acked-by: Jason Wang <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-memset.c')
0 files changed, 0 insertions, 0 deletions