diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2015-06-17 12:15:09 +0800 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2015-06-19 07:37:36 +1000 |
commit | 0cb7dba2eb6158366fe78db7163fde37638d230b (patch) | |
tree | f828ca511c4624dc024de38ad772221a651c57c5 /hw/prd.c | |
parent | c8d15a5d13cea5a7b2d6a6ee634dfd17c83c8c13 (diff) | |
download | skiboot-0cb7dba2eb6158366fe78db7163fde37638d230b.zip skiboot-0cb7dba2eb6158366fe78db7163fde37638d230b.tar.gz skiboot-0cb7dba2eb6158366fe78db7163fde37638d230b.tar.bz2 |
hw/prd: Fix handling of invlid message types
If we get a prd_message_consumed callback from the opal_msg interface,
and it has an invalid message type, then we'll end up returning with the
events_lock held.
This really shouldn't happen (as we have handlers for all message types
that we queue), but we should still handle this gracefully. This change
fixes the error path to log and error and send any further queued
messages.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw/prd.c')
-rw-r--r-- | hw/prd.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -113,10 +113,12 @@ static void prd_msg_consumed(void *data) event = EVENT_OCC_RESET; break; default: - return; + prlog(PR_ERR, "PRD: invalid msg consumed, type: 0x%x\n", + msg->hdr.type); } - events[proc] &= ~event; + if (event) + events[proc] &= ~event; prd_msg_inuse = false; send_pending_events(); unlock(&events_lock); |