Skip to content

Commit

Permalink
s390/zcore: Fix HSA copy length for last block
Browse files Browse the repository at this point in the history
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: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
  • Loading branch information
Michael Holzheu authored and Martin Schwidefsky committed Apr 23, 2013
1 parent ab8e523 commit 241fd9b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/s390/char/zcore.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 241fd9b

Please sign in to comment.