Skip to content

Commit

Permalink
Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/gi…
Browse files Browse the repository at this point in the history
…t/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
  • Loading branch information
Linus Torvalds committed Dec 2, 2020
2 parents bb95d60 + 2c60274 commit 2c6ffa9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions drivers/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ obj-$(CONFIG_OF) += of/
obj-$(CONFIG_SSB) += ssb/
obj-$(CONFIG_BCMA) += bcma/
obj-$(CONFIG_VHOST_RING) += vhost/
obj-$(CONFIG_VHOST_IOTLB) += vhost/
obj-$(CONFIG_VHOST) += vhost/
obj-$(CONFIG_VLYNQ) += vlynq/
obj-$(CONFIG_GREYBUS) += greybus/
Expand Down
1 change: 1 addition & 0 deletions drivers/vdpa/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ config IFCVF

config MLX5_VDPA
bool
select VHOST_IOTLB
help
Support library for Mellanox VDPA drivers. Provides code that is
common for all types of VDPA drivers. The following drivers are planned:
Expand Down
4 changes: 3 additions & 1 deletion drivers/vhost/vdpa.c
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,9 @@ static long vhost_vdpa_get_iova_range(struct vhost_vdpa *v, u32 __user *argp)
.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,
Expand Down

0 comments on commit 2c6ffa9

Please sign in to comment.