mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
memcpy_real(): WRITE is "data source", not destination...
[ Upstream commit77729412ac] Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Stable-dep-of:6dd88fd59d("vhost-scsi: unbreak any layout for response") Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
cefb33f5be
commit
b50705b5ef
@@ -128,7 +128,7 @@ int memcpy_real(void *dest, unsigned long src, size_t count)
|
||||
|
||||
kvec.iov_base = dest;
|
||||
kvec.iov_len = count;
|
||||
iov_iter_kvec(&iter, WRITE, &kvec, 1, count);
|
||||
iov_iter_kvec(&iter, READ, &kvec, 1, count);
|
||||
if (memcpy_real_iter(&iter, src, count) < count)
|
||||
return -EFAULT;
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user