diff options
author | Michael Holzheu <holzheu@de.ibm.com> | 2007-08-10 14:32:32 +0200 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2007-08-10 14:32:37 +0200 |
commit | f2405598e0678e9c93dd780f2a12fc562ece3d13 (patch) | |
tree | 436b83be63f88e567e6769b8cdec37bcdce020f2 /drivers/s390/char/vmur.c | |
parent | 278bc68c4bfcd1af97972f5c4458acf3b9b19c37 (diff) | |
download | linux-stable-f2405598e0678e9c93dd780f2a12fc562ece3d13.tar.gz linux-stable-f2405598e0678e9c93dd780f2a12fc562ece3d13.tar.bz2 linux-stable-f2405598e0678e9c93dd780f2a12fc562ece3d13.zip |
[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>
Diffstat (limited to 'drivers/s390/char/vmur.c')
-rw-r--r-- | drivers/s390/char/vmur.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/s390/char/vmur.c b/drivers/s390/char/vmur.c index 27b8bf927415..04395c0f99d8 100644 --- a/drivers/s390/char/vmur.c +++ b/drivers/s390/char/vmur.c @@ -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) |