[Skiboot] [PATCH] bmc_platform: fail PNOR access request if no bmc *before* we reserve it

Stewart Smith stewart at linux.vnet.ibm.com
Tue Nov 8 17:31:02 AEDT 2016


Fixes: 5611389876a748e19b7593d4eb426ced7a6ed31f
Reported-by: Vasant Hegde <hegdevasant at linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart at linux.vnet.ibm.com>
---
 hw/ipmi/ipmi-sel.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/hw/ipmi/ipmi-sel.c b/hw/ipmi/ipmi-sel.c
index b79959c..2cd4535 100644
--- a/hw/ipmi/ipmi-sel.c
+++ b/hw/ipmi/ipmi-sel.c
@@ -464,10 +464,6 @@ static void sel_pnor(uint8_t access)
 	switch (access) {
 	case REQUEST_PNOR:
 		prlog(PR_NOTICE, "PNOR access requested\n");
-		granted = flash_reserve();
-		if (granted)
-			occ_pnor_set_owner(PNOR_OWNER_EXTERNAL);
-
 		if (bmc_platform->ipmi_oem_pnor_access_status == 0) {
 			/**
 			 * @fwts-label PNORAccessYeahButNoBut
@@ -479,6 +475,9 @@ static void sel_pnor(uint8_t access)
 			break;
 		}
 
+		granted = flash_reserve();
+		if (granted)
+			occ_pnor_set_owner(PNOR_OWNER_EXTERNAL);
 		/* Ack the request */
 		msg = ipmi_mkmsg_simple(bmc_platform->ipmi_oem_pnor_access_status, &granted, 1);
 		ipmi_queue_msg(msg);
-- 
2.7.4



More information about the Skiboot mailing list