mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-21 00:42:16 +00:00
[S390] vmur: fix diag14_read.
Record length of spool file must be only stored in 1st SPLINK record Signed-off-by: Frank Munzert <munzert@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:
parent
7a8e0c8d9a
commit
2b3d8c9e06
@ -486,7 +486,7 @@ static ssize_t diag14_read(struct file *file, char __user *ubuf, size_t count,
|
||||
}
|
||||
if (rc)
|
||||
goto fail;
|
||||
if (reclen)
|
||||
if (reclen && (copied == 0) && (*offs < PAGE_SIZE))
|
||||
*((u16 *) &buf[FILE_RECLEN_OFFSET]) = reclen;
|
||||
len = min(count - copied, PAGE_SIZE - res);
|
||||
if (copy_to_user(ubuf + copied, buf + res, len)) {
|
||||
|
Loading…
Reference in New Issue
Block a user