[Skiboot] [PATCH] [SURV] Fix surveillance locking

Ananth N Mavinakayanahalli ananth at in.ibm.com
Mon Jun 15 20:33:20 AEST 2015


There is one instance of fsp_surv_state that is accessed without
the surveillance lock. Fix it.

Signed-off-by: Ananth N Mavinakayanahalli <ananth at in.ibm.com>
---
 hw/fsp/fsp-surveillance.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/hw/fsp/fsp-surveillance.c b/hw/fsp/fsp-surveillance.c
index b94eb1b..18b2afd 100644
--- a/hw/fsp/fsp-surveillance.c
+++ b/hw/fsp/fsp-surveillance.c
@@ -192,8 +192,10 @@ static bool fsp_surv_msg_rr(u32 cmd_sub_mod, struct fsp_msg *msg)
 	switch (cmd_sub_mod) {
 	case FSP_RESET_START:
 		printf("SURV: Disabling surveillance\n");
+		lock(&surv_lock);
 		fsp_surv_state = false;
 		fsp_surv_ack_pending = false;
+		unlock(&surv_lock);
 		return true;
 	case FSP_RELOAD_COMPLETE:
 		fsp_surv_query();



More information about the Skiboot mailing list