]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
s390/iucv: fix receive buffer virtual vs physical address confusion
authorAlexander Gordeev <agordeev@linux.ibm.com>
Fri, 16 Feb 2024 12:13:26 +0000 (13:13 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Sep 2024 11:17:38 +0000 (13:17 +0200)
[ Upstream commit 4e8477aeb46dfe74e829c06ea588dd00ba20c8cc ]

Fix IUCV_IPBUFLST-type buffers virtual vs physical address confusion.
This does not fix a bug since virtual and physical address spaces are
currently the same.

Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
Reviewed-by: Alexandra Winter <wintera@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/iucv/iucv.c

index 06770b77e5d2223b91d01046268a62cc22a54f70..be5f598acbce26aa6d7bf570aec958d91477d697 100644 (file)
@@ -1088,8 +1088,7 @@ static int iucv_message_receive_iprmdata(struct iucv_path *path,
                size = (size < 8) ? size : 8;
                for (array = buffer; size > 0; array++) {
                        copy = min_t(size_t, size, array->length);
-                       memcpy((u8 *)(addr_t) array->address,
-                               rmmsg, copy);
+                       memcpy(phys_to_virt(array->address), rmmsg, copy);
                        rmmsg += copy;
                        size -= copy;
                }