aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform/surface/aggregator/ssh_parser.c
diff options
context:
space:
mode:
authorGreg Kurz <[email protected]>2020-10-03 10:01:52 +0000
committerMichael S. Tsirkin <[email protected]>2020-10-04 07:43:03 +0000
commit0210a8db2aeca393fb3067e234967877e3146266 (patch)
tree43deeb36d07efb02ea3695934c31c2bf3ebd894d /drivers/platform/surface/aggregator/ssh_parser.c
parentvhost vdpa: fix vhost_vdpa_open error handling (diff)
downloadkernel-0210a8db2aeca393fb3067e234967877e3146266.tar.gz
kernel-0210a8db2aeca393fb3067e234967877e3146266.zip
vhost: Don't call access_ok() when using IOTLB
When the IOTLB device is enabled, the vring addresses we get from userspace are GIOVAs. It is thus wrong to pass them down to access_ok() which only takes HVAs. Access validation is done at prefetch time with IOTLB. Teach vq_access_ok() about that by moving the (vq->iotlb) check from vhost_vq_access_ok() to vq_access_ok(). This prevents vhost_vring_set_addr() to fail when verifying the accesses. No behavior change for vhost_vq_access_ok(). BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1883084 Fixes: 6b1e6cc7855b ("vhost: new device IOTLB API") Cc: [email protected] CC: [email protected] # 4.14+ Signed-off-by: Greg Kurz <[email protected]> Acked-by: Jason Wang <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Michael S. Tsirkin <[email protected]>
Diffstat (limited to 'drivers/platform/surface/aggregator/ssh_parser.c')
0 files changed, 0 insertions, 0 deletions