aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorPeter Oberparleiter <peter.oberparleiter@de.ibm.com>2009-02-19 09:18:59 -0500
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2009-02-19 09:19:19 -0500
commite2e5a0f2b100a5204d27def8bbf73333d1710be2 (patch)
tree9ac0c72074dcc17f5083defda5d2270119f3e633 /drivers
parentba95fd47d177d46743ad94055908d22840370e06 (diff)
[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')
-rw-r--r--drivers/s390/char/sclp.c5
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)
280 rc = 0; 280 rc = 0;
281 for (offset = sizeof(struct sccb_header); offset < sccb->length; 281 for (offset = sizeof(struct sccb_header); offset < sccb->length;
282 offset += evbuf->length) { 282 offset += evbuf->length) {
283 /* Search for event handler */
284 evbuf = (struct evbuf_header *) ((addr_t) sccb + offset); 283 evbuf = (struct evbuf_header *) ((addr_t) sccb + offset);
284 /* Check for malformed hardware response */
285 if (evbuf->length == 0)
286 break;
287 /* Search for event handler */
285 reg = NULL; 288 reg = NULL;
286 list_for_each(l, &sclp_reg_list) { 289 list_for_each(l, &sclp_reg_list) {
287 reg = list_entry(l, struct sclp_register, list); 290 reg = list_entry(l, struct sclp_register, list);