vdpa: last minute bugfixes

A couple of fixes that surfaced at the last minute.
 
 Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
 -----BEGIN PGP SIGNATURE-----
 
 iQFDBAABCAAtFiEEXQn9CHHI+FuUyooNKB8NuNKNVGkFAl/HYDoPHG1zdEByZWRo
 YXQuY29tAAoJECgfDbjSjVRpAlcIAKqNeivPCnQMwn8dgi12wvEEa45KANom/Zmt
 L48q/Lbx2gbORio6vpCtjLwGd/biHG7rVZCyXu0UIdDDIprOVtDxpHpXfZOV7Qqd
 2CGEYnYIY+GFwluskOEi+dIZmP0C2qa1q8y+BzpfuZrXTlG7h0onqR+LNqcoaTTN
 P5jFnUzwfB1hEdb4ShHWUDTc7FweyrK/rbcIWCL7kgjl9drVgy6pLBXCJOad4kE7
 z7tZCrWiQ7cHGwApojo8FjUAyT0nA24J8p9JHMIKUHVVTVNlvrZaOunyWan50NeB
 nPXR64StmWex7S9Jl2juA8XihPenSE9MwVL7wmzN4jLSLhMSQR4=
 =9f9c
 -----END PGP SIGNATURE-----

Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost

Pull vdpa fixes from Michael Tsirkin:
 "A couple of fixes that surfaced at the last minute"

* tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
  vhost_vdpa: return -EFAULT if copy_to_user() fails
  vdpa: mlx5: fix vdpa/vhost dependencies
This commit is contained in:
Linus Torvalds 2020-12-02 12:20:11 -08:00
commit 2c6ffa9e9b
3 changed files with 5 additions and 1 deletions

View file

@ -145,6 +145,7 @@ obj-$(CONFIG_OF) += of/
obj-$(CONFIG_SSB) += ssb/ obj-$(CONFIG_SSB) += ssb/
obj-$(CONFIG_BCMA) += bcma/ obj-$(CONFIG_BCMA) += bcma/
obj-$(CONFIG_VHOST_RING) += vhost/ obj-$(CONFIG_VHOST_RING) += vhost/
obj-$(CONFIG_VHOST_IOTLB) += vhost/
obj-$(CONFIG_VHOST) += vhost/ obj-$(CONFIG_VHOST) += vhost/
obj-$(CONFIG_VLYNQ) += vlynq/ obj-$(CONFIG_VLYNQ) += vlynq/
obj-$(CONFIG_GREYBUS) += greybus/ obj-$(CONFIG_GREYBUS) += greybus/

View file

@ -32,6 +32,7 @@ config IFCVF
config MLX5_VDPA config MLX5_VDPA
bool bool
select VHOST_IOTLB
help help
Support library for Mellanox VDPA drivers. Provides code that is Support library for Mellanox VDPA drivers. Provides code that is
common for all types of VDPA drivers. The following drivers are planned: common for all types of VDPA drivers. The following drivers are planned:

View file

@ -348,7 +348,9 @@ static long vhost_vdpa_get_iova_range(struct vhost_vdpa *v, u32 __user *argp)
.last = v->range.last, .last = v->range.last,
}; };
return copy_to_user(argp, &range, sizeof(range)); if (copy_to_user(argp, &range, sizeof(range)))
return -EFAULT;
return 0;
} }
static long vhost_vdpa_vring_ioctl(struct vhost_vdpa *v, unsigned int cmd, static long vhost_vdpa_vring_ioctl(struct vhost_vdpa *v, unsigned int cmd,