Message ID | 1424320657-20893-2-git-send-email-alistair@popple.id.au |
---|---|
State | Accepted |
Headers | show |
diff --git a/core/ipmi.c b/core/ipmi.c index 39997f6..6c1179f 100644 --- a/core/ipmi.c +++ b/core/ipmi.c @@ -126,15 +126,13 @@ void ipmi_cmd_done(uint8_t cmd, uint8_t netfn, uint8_t cc, struct ipmi_msg *msg) void ipmi_queue_msg_sync(struct ipmi_msg *msg) { lock(&sync_lock); - - assert(!sync_msg); + while (sync_msg); sync_msg = msg; ipmi_queue_msg(msg); + unlock(&sync_lock); - while (sync_msg) + while (sync_msg == msg) time_wait_ms(100); - - unlock(&sync_lock); } static void ipmi_read_event_complete(struct ipmi_msg *msg)
Skiboot now doesn't run the running pollers while holding a lock to avoid dead-locks. The current implementation of ipmi_queue_msg_sync() does exactly that while it waits for the pollers to be called. This patch fixes the problem by releasing the lock prior to calling the pollers. Signed-off-by: Alistair Popple <alistair@popple.id.au> --- core/ipmi.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)