diff options
author | Collin Walling <walling@linux.ibm.com> | 2020-09-15 15:44:12 -0400 |
---|---|---|
committer | Cornelia Huck <cohuck@redhat.com> | 2020-10-02 13:52:49 +0200 |
commit | 0260b97824495ebfacfa8bbae0be10b0ef986bf6 (patch) | |
tree | e545c3d6baddceebe7a45e9af548154203a8007a /hw/pci-bridge/xio3130_downstream.c | |
parent | c1db53a5910f988eeb32f031c53a50f3373fd824 (diff) |
s390/sclp: check sccb len before filling in data
The SCCB must be checked for a sufficient length before it is filled
with any data. If the length is insufficient, then the SCLP command
is suppressed and the proper response code is set in the SCCB header.
While we're at it, let's cleanup the length check by placing the
calculation inside a macro.
Fixes: 832be0d8a3bb ("s390x: sclp: Report insufficient SCCB length")
Signed-off-by: Collin Walling <walling@linux.ibm.com>
Reviewed-by: Janosch Frank <frankja@linux.ibm.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Message-Id: <20200915194416.107460-5-walling@linux.ibm.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Diffstat (limited to 'hw/pci-bridge/xio3130_downstream.c')
0 files changed, 0 insertions, 0 deletions