diff options
author | Peter Oberparleiter <peter.oberparleiter@de.ibm.com> | 2009-02-19 15:18:59 +0100 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2009-02-19 15:19:19 +0100 |
commit | e2e5a0f2b100a5204d27def8bbf73333d1710be2 (patch) | |
tree | 9ac0c72074dcc17f5083defda5d2270119f3e633 /drivers/s390 | |
parent | ba95fd47d177d46743ad94055908d22840370e06 (diff) | |
download | blackbird-op-linux-e2e5a0f2b100a5204d27def8bbf73333d1710be2.tar.gz blackbird-op-linux-e2e5a0f2b100a5204d27def8bbf73333d1710be2.zip |
[S390] sclp: handle empty event buffers
Handle a malformed hardware response which some versions of the
Support Element (SE) may present during SE restart and which otherwise
would result in an endless loop in function sclp_dispatch_evbufs.
Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/char/sclp.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/s390/char/sclp.c b/drivers/s390/char/sclp.c index 1fd8f2193ed8..4377e93a43d7 100644 --- a/drivers/s390/char/sclp.c +++ b/drivers/s390/char/sclp.c @@ -280,8 +280,11 @@ sclp_dispatch_evbufs(struct sccb_header *sccb) rc = 0; for (offset = sizeof(struct sccb_header); offset < sccb->length; offset += evbuf->length) { - /* Search for event handler */ evbuf = (struct evbuf_header *) ((addr_t) sccb + offset); + /* Check for malformed hardware response */ + if (evbuf->length == 0) + break; + /* Search for event handler */ reg = NULL; list_for_each(l, &sclp_reg_list) { reg = list_entry(l, struct sclp_register, list); |