[S390] vmur: reject open on z/VM reader files with status HOLD
If a reader file with HOLD status is at the top of the reader queue, currently all read requests will return data of the second file in the queue. But the semantics of vmur is that always the topmost file is read. With this fix -EPERM is returned on open, if the topmost reader file is in HOLD status. Signed-off-by: Michael Holzheu <holzheu@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:
committed by
Martin Schwidefsky
parent
278bc68c4b
commit
f2405598e0
@@ -556,7 +556,9 @@ static int verify_device(struct urdev *urd)
|
||||
rc = diag_read_next_file_info(&fcb, 0);
|
||||
if (rc)
|
||||
return rc;
|
||||
|
||||
/* if file is in hold status, we do not read it */
|
||||
if (fcb.file_stat & (FLG_SYSTEM_HOLD | FLG_USER_HOLD))
|
||||
return -EPERM;
|
||||
/* open file on virtual reader */
|
||||
buf = kmalloc(PAGE_SIZE, GFP_KERNEL);
|
||||
if (!buf)
|
||||
|
Reference in New Issue
Block a user