Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 241fd9bc authored by Michael Holzheu's avatar Michael Holzheu Committed by Martin Schwidefsky
Browse files

s390/zcore: Fix HSA copy length for last block



Currently always one page is copied to a user buffer for the last
HSA block in memcpy_hsa(). Now the correct length is used.

Signed-off-by: default avatarMichael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent ab8e5235
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -127,7 +127,7 @@ static int memcpy_hsa(void *dest, unsigned long src, size_t count, int mode)
	}
	if (mode == TO_USER) {
		if (copy_to_user((__force __user void*) dest + offs, buf,
				 PAGE_SIZE))
				 count - offs))
			return -EFAULT;
	} else
		memcpy(dest + offs, buf, count - offs);