linux-stable/drivers/vhost
Si-Wei Liu 7ed9e3d97c vhost-vdpa: fix page pinning leakage in error path
Pinned pages are not properly accounted particularly when
mapping error occurs on IOTLB update. Clean up dangling
pinned pages for the error path. As the inflight pinned
pages, specifically for memory region that strides across
multiple chunks, would need more than one free page for
book keeping and accounting. For simplicity, pin pages
for all memory in the IOVA range in one go rather than
have multiple pin_user_pages calls to make up the entire
region. This way it's easier to track and account the
pages already mapped, particularly for clean-up in the
error path.

Fixes: 4c8cf31885 ("vhost: introduce vDPA-based backend")
Signed-off-by: Si-Wei Liu <si-wei.liu@oracle.com>
Link: https://lore.kernel.org/r/1601701330-16837-3-git-send-email-si-wei.liu@oracle.com
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2020-10-04 03:47:02 -04:00
..
iotlb.c vhost: Fix documentation 2020-09-24 05:54:36 -04:00
Kconfig vhost_vdpa: implement IRQ offloading in vhost_vdpa 2020-08-05 11:08:42 -04:00
Makefile vhost: introduce vDPA-based backend 2020-04-02 10:41:40 -04:00
net.c virtio: fixes, features 2020-08-11 14:34:17 -07:00
scsi.c vhost/scsi: fix up req type endian-ness 2020-07-29 13:24:30 -04:00
test.c tools/virtio: Add --reset 2020-06-22 12:34:21 -04:00
test.h tools/virtio: Add --reset 2020-06-22 12:34:21 -04:00
vdpa.c vhost-vdpa: fix page pinning leakage in error path 2020-10-04 03:47:02 -04:00
vhost.c vhost: Don't call log_access_ok() when using IOTLB 2020-10-04 03:45:20 -04:00
vhost.h vhost: generialize backend features setting/getting 2020-08-05 18:39:18 -04:00
vringh.c virtio: force spec specified alignment on types 2020-06-02 02:45:13 -04:00
vsock.c vhost: allow device that does not depend on vhost worker 2020-06-04 15:36:51 -04:00