summaryrefslogtreecommitdiffstats
path: root/drivers/s390/char/sclp.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-02-20 11:35:57 +0100
committerIngo Molnar <mingo@elte.hu>2009-02-20 11:35:57 +0100
commit64b36ca7f408e0bd45487c8c28f168f11f3b6dcd (patch)
tree0b8ed22d46d775f04d441e8c480c12ec297a005b /drivers/s390/char/sclp.c
parent00a8bf859331e349713274825e6fbf20bf2ac15a (diff)
parent402a917aca5daca69fcc91f43e6f1e6939cf393b (diff)
downloadlinux-64b36ca7f408e0bd45487c8c28f168f11f3b6dcd.tar.gz
linux-64b36ca7f408e0bd45487c8c28f168f11f3b6dcd.tar.bz2
linux-64b36ca7f408e0bd45487c8c28f168f11f3b6dcd.zip
Merge branches 'tracing/function-graph-tracer' and 'linus' into tracing/core
Diffstat (limited to 'drivers/s390/char/sclp.c')
-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)
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);