]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
vhost: correctly check the iova range when waking virtqueue
authorJason Wang <jasowang@redhat.com>
Fri, 24 Aug 2018 08:53:13 +0000 (16:53 +0800)
committerJuerg Haefliger <juergh@canonical.com>
Wed, 24 Jul 2019 01:46:18 +0000 (19:46 -0600)
commitee1676a5999742a83a805706613a2c29bd8a5de7
treeecb89d767ae05986b621f6739a5cbdafe6e0f612
parent4f6daa9e31b0364abf8895f373791631625af7fb
vhost: correctly check the iova range when waking virtqueue

BugLink: https://bugs.launchpad.net/bugs/1835972
[ Upstream commit 2d66f997f0545c8f7fc5cf0b49af1decb35170e7 ]

We don't wakeup the virtqueue if the first byte of pending iova range
is the last byte of the range we just got updated. This will lead a
virtqueue to wait for IOTLB updating forever. Fixing by correct the
check and wake up the virtqueue in this case.

Fixes: 6b1e6cc7855b ("vhost: new device IOTLB API")
Reported-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Tested-by: Peter Xu <peterx@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/vhost/vhost.c