[Skiboot] [PATCH 3/4] ELOG: Fix possible event notifier hangs

Vasant Hegde hegdevasant at linux.vnet.ibm.com
Fri Jun 24 20:39:24 AEST 2016


In some corner cases host may send acknowledgement without
reading actual data (fsp_opal_elog_info -> fsp_opal_elog_ack).
Because of this elog_read_from_fsp_head_state may be stuck in
wrong state (ELOG_STATE_HOST_INFO) and not able to send remaining
ELOG's to host. Hence reset ELOG state and start sending remaning
ELOG's.

Signed-off-by: Vasant Hegde <hegdevasant at linux.vnet.ibm.com>
---
 hw/fsp/fsp-elog-read.c |   10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/hw/fsp/fsp-elog-read.c b/hw/fsp/fsp-elog-read.c
index 40575f0..8f5500b 100644
--- a/hw/fsp/fsp-elog-read.c
+++ b/hw/fsp/fsp-elog-read.c
@@ -386,8 +386,18 @@ static int64_t fsp_opal_elog_ack(uint64_t ack_id)
 	list_for_each_safe(&elog_read_pending, record, next_record, link) {
 		if (record->log_id != ack_id)
 			continue;
+		/* It means host has sent ACK without reading actual data.
+		 * Because of this elog_read_from_fsp_head_state may be
+		 * stuck in wrong state (ELOG_STATE_HOST_INFO) and not able
+		 * to send remaning ELOG's to host. Hence reset ELOG state
+		 * and start sending remaining ELOG's.
+		 */
 		list_del(&record->link);
 		list_add(&elog_read_free, &record->link);
+		elog_reject_head();
+		unlock(&elog_read_lock);
+		fsp_elog_check_and_fetch_head();
+		return rc;
 	}
 	list_for_each_safe(&elog_read_processed, record, next_record, link) {
 		if (record->log_id != ack_id)



More information about the Skiboot mailing list