aboutsummaryrefslogtreecommitdiff
path: root/hw/s390x
diff options
context:
space:
mode:
authorJanosch Frank <frankja@linux.ibm.com>2019-09-27 15:33:22 +0200
committerChristian Borntraeger <borntraeger@de.ibm.com>2019-09-30 13:51:50 +0200
commitd959f6cf502f37ddda91140a2e7a2e2b72de397e (patch)
tree3c3f36d532654fd05139b3740934c6255ee55ce5 /hw/s390x
parent6f6c9333efaf43d5a6f435266444aa2c51ac11b2 (diff)
downloadqemu-d959f6cf502f37ddda91140a2e7a2e2b72de397e.zip
qemu-d959f6cf502f37ddda91140a2e7a2e2b72de397e.tar.gz
qemu-d959f6cf502f37ddda91140a2e7a2e2b72de397e.tar.bz2
s390x: sclp: fix error handling for oversize control blocks
Requests over 4k are not a spec exception. Signed-off-by: Janosch Frank <frankja@linux.ibm.com> Reviewed-by: Jason J. Herne <jjherne@linux.ibm.com> Message-Id: <1569591203-15258-4-git-send-email-imbrenda@linux.ibm.com> Acked-by: David Hildenbrand <david@redhat.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Diffstat (limited to 'hw/s390x')
-rw-r--r--hw/s390x/sclp.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/s390x/sclp.c b/hw/s390x/sclp.c
index 73244c9..abb6e50 100644
--- a/hw/s390x/sclp.c
+++ b/hw/s390x/sclp.c
@@ -213,8 +213,7 @@ int sclp_service_call(CPUS390XState *env, uint64_t sccb, uint32_t code)
cpu_physical_memory_read(sccb, &work_sccb, sccb_len);
/* Valid sccb sizes */
- if (be16_to_cpu(work_sccb.h.length) < sizeof(SCCBHeader) ||
- be16_to_cpu(work_sccb.h.length) > SCCB_SIZE) {
+ if (be16_to_cpu(work_sccb.h.length) < sizeof(SCCBHeader)) {
r = -PGM_SPECIFICATION;
goto out;
}