提交 e2e5a0f2 编写于 作者: P Peter Oberparleiter 提交者: Martin Schwidefsky

[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: NPeter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
上级 ba95fd47
...@@ -280,8 +280,11 @@ sclp_dispatch_evbufs(struct sccb_header *sccb) ...@@ -280,8 +280,11 @@ sclp_dispatch_evbufs(struct sccb_header *sccb)
rc = 0; rc = 0;
for (offset = sizeof(struct sccb_header); offset < sccb->length; for (offset = sizeof(struct sccb_header); offset < sccb->length;
offset += evbuf->length) { offset += evbuf->length) {
/* Search for event handler */
evbuf = (struct evbuf_header *) ((addr_t) sccb + offset); evbuf = (struct evbuf_header *) ((addr_t) sccb + offset);
/* Check for malformed hardware response */
if (evbuf->length == 0)
break;
/* Search for event handler */
reg = NULL; reg = NULL;
list_for_each(l, &sclp_reg_list) { list_for_each(l, &sclp_reg_list) {
reg = list_entry(l, struct sclp_register, list); reg = list_entry(l, struct sclp_register, list);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册