[Skiboot] [PATCH] bt: Check before dequeuing messages with ipmi_dequeue_msg

Alistair Popple alistair at popple.id.au
Wed Jul 1 16:53:09 AEST 2015


We will soon expose the dequeue message function which deletes
previously queued messages from the message queue. It could help catch
a few bugs by doing some extra checks.

Signed-off-by: Alistair Popple <alistair at popple.id.au>
---
 hw/bt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/bt.c b/hw/bt.c
index 0c89d9f..e81498f 100644
--- a/hw/bt.c
+++ b/hw/bt.c
@@ -490,7 +490,7 @@ static int bt_del_ipmi_msg(struct ipmi_msg *ipmi_msg)
 	struct bt_msg *bt_msg = container_of(ipmi_msg, struct bt_msg, ipmi_msg);
 
 	lock(&bt.lock);
-	list_del(&bt_msg->link);
+	list_del_from(&bt.msgq, &bt_msg->link);
 	bt.queue_len--;
 	bt_send_and_unlock();
 	return 0;
-- 
1.8.3.2



More information about the Skiboot mailing list