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)
committerHeiko Carstens <hca@linux.ibm.com>
Wed, 13 Mar 2024 08:23:45 +0000 (09:23 +0100)
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>
net/iucv/iucv.c

index 5b56ae6612dd11f218241a9735e4435fd517b0bf..15b3a958fa0883defef92cad96697058116a01b4 100644 (file)
@@ -1081,8 +1081,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;
                }