diff options
author | Michael Holzheu <holzheu@linux.vnet.ibm.com> | 2013-04-19 12:03:02 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2013-04-23 04:18:07 -0400 |
commit | 241fd9bcbc10c144531e88b5e3a62bc11090e5e4 (patch) | |
tree | 303ab61c82877bf1572509b49ba964152864e7f0 | |
parent | ab8e5235868f99dfc779e4eaff28f53d63714ce4 (diff) |
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: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
-rw-r--r-- | drivers/s390/char/zcore.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/s390/char/zcore.c b/drivers/s390/char/zcore.c index 1d61a01576d2..22820610022c 100644 --- a/drivers/s390/char/zcore.c +++ b/drivers/s390/char/zcore.c | |||
@@ -127,7 +127,7 @@ static int memcpy_hsa(void *dest, unsigned long src, size_t count, int mode) | |||
127 | } | 127 | } |
128 | if (mode == TO_USER) { | 128 | if (mode == TO_USER) { |
129 | if (copy_to_user((__force __user void*) dest + offs, buf, | 129 | if (copy_to_user((__force __user void*) dest + offs, buf, |
130 | PAGE_SIZE)) | 130 | count - offs)) |
131 | return -EFAULT; | 131 | return -EFAULT; |
132 | } else | 132 | } else |
133 | memcpy(dest + offs, buf, count - offs); | 133 | memcpy(dest + offs, buf, count - offs); |