s390/zcore: Fix HSA copy length for last block
[deliverable/linux.git] / drivers / s390 / char / zcore.c
index 1d61a01576d213ac600e367e231272a2fbbcb5dc..22820610022c6e21a190c06d1b014ae7b900e33d 100644 (file)
@@ -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);
This page took 0.074994 seconds and 5 git commands to generate.