]> git.baikalelectronics.ru Git - kernel.git/commit
vhost: allow batching hint without size
authorJason Wang <jasowang@redhat.com>
Thu, 10 Mar 2022 07:52:11 +0000 (15:52 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 10 Mar 2022 13:12:04 +0000 (08:12 -0500)
commitea75f758f49d61c6e74e0cbd10999466500b94ed
tree168fc062bd85d9bdf0f2437df3f610b293218d85
parent6836cc450417b8439d11213130a6a26281b08f56
vhost: allow batching hint without size

Commit 4e866845c88f ("vhost: fix hung thread due to erroneous iotlb
entries") tries to reject the IOTLB message whose size is zero. But
the size is not necessarily meaningful, one example is the batching
hint, so the commit breaks that.

Fixing this be reject zero size message only if the message is used to
update/invalidate the IOTLB.

Fixes: 4e866845c88f ("vhost: fix hung thread due to erroneous iotlb entries")
Reported-by: Eli Cohen <elic@nvidia.com>
Cc: Anirudh Rayabharam <mail@anirudhrb.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Link: https://lore.kernel.org/r/20220310075211.4801-1-jasowang@redhat.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Tested-by: Eli Cohen <elic@nvidia.com>
drivers/vhost/vhost.c