]> www.infradead.org Git - users/dwmw2/linux.git/commit
uaccess: Fix is_source param for check_copy_size() in copy_to_iter_mcsafe()
authorDave Jiang <dave.jiang@intel.com>
Wed, 5 Sep 2018 20:31:40 +0000 (13:31 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Oct 2018 23:59:19 +0000 (16:59 -0700)
commit2436ce1bad9ec8756d2c6626b794ddac67cd86ef
tree3e8b8a1665fb376982968ee8a9b1bf4fffbdafb7
parentdc38ebde8a524c88ec3d6c5e7e4906d95fa6cbac
uaccess: Fix is_source param for check_copy_size() in copy_to_iter_mcsafe()

commit dfb06cba8c73c0704710b2e3fbe2c35ac66a01b4 upstream.

copy_to_iter_mcsafe() is passing in the is_source parameter as "false"
to check_copy_size(). This is different than what copy_to_iter() does.
Also, the addr parameter passed to check_copy_size() is the source so
therefore we should be passing in "true" instead.

Fixes: 8780356ef630 ("x86/asm/memcpy_mcsafe: Define copy_to_iter_mcsafe()")
Cc: <stable@vger.kernel.org>
Reported-by: Fan Du <fan.du@intel.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Reviewed-by: Vishal Verma <vishal.l.verma@intel.com>
Reported-by: Wenwei Tao <wenwei.tww@alibaba-inc.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/uio.h