]> git.baikalelectronics.ru Git - 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)
committerDavid S. Miller <davem@davemloft.net>
Sun, 26 Aug 2018 00:39:41 +0000 (17:39 -0700)
commitae17ef85090eb6297bf790fa236a1c4676f087e3
tree3089fb25f6dca1d8292711b2267e1feb4661ec04
parent6f43e2fd5550f58926b264c8f74168b75f5f2ec7
vhost: correctly check the iova range when waking virtqueue

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: ac35b12314c7 ("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>
drivers/vhost/vhost.c