]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
vhost_vdpa: Return -EFAULT if copy_from_user() fails
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 23 Oct 2020 12:08:53 +0000 (15:08 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Nov 2020 10:51:57 +0000 (11:51 +0100)
commit89c2fd0d313efe95a9330a6ad2aee930a6a8a075
treebccfdb7af4e7fca0a3e0a5f06398a566c339c90a
parent55124c2cd137e3543804523357552f58a65ceeca
vhost_vdpa: Return -EFAULT if copy_from_user() fails

commit 7922460e33c81f41e0d2421417228b32e6fdbe94 upstream.

The copy_to/from_user() functions return the number of bytes which we
weren't able to copy but the ioctl should return -EFAULT if they fail.

Fixes: a127c5bbb6a8 ("vhost-vdpa: fix backend feature ioctls")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20201023120853.GI282278@mwanda
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Cc: stable@vger.kernel.org
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/vhost/vdpa.c