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

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
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment