]> git.baikalelectronics.ru Git - kernel.git/commitdiff
memcpy_real(): WRITE is "data source", not destination...
authorAl Viro <viro@zeniv.linux.org.uk>
Sun, 23 Oct 2022 17:29:08 +0000 (13:29 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Feb 2023 10:28:03 +0000 (11:28 +0100)
[ Upstream commit 77729412acde120712f5793e9134c2b1cbd1ee02 ]

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Stable-dep-of: 6dd88fd59da8 ("vhost-scsi: unbreak any layout for response")
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/s390/mm/maccess.c

index 1571cdcb0c50c110900a7660f0e1c68c49243239..753b006c8ea54a144ac1b4bb95f01d00092ba26c 100644 (file)
@@ -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;