From 0f05bf6149f72ba6642558066feb671565bd392e Mon Sep 17 00:00:00 2001 From: David Herrmann Date: Thu, 23 Oct 2014 14:02:55 +0200 Subject: [PATCH] connection: make sure to delete reply_wake entries If we reply to a pending method call, we must make sure to only allow a single connection to respond. Therefore, unqueue reply_wake entries unconditionally after we allowed a single call to pass through. Signed-off-by: David Herrmann --- connection.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/connection.c b/connection.c index ad467ea..68b0cad 100644 --- a/connection.c +++ b/connection.c @@ -425,12 +425,11 @@ static int kdbus_conn_check_access(struct kdbus_ep *ep, list_for_each_entry_safe(r, tmp, &conn_src->reply_list, entry) { if (r->reply_dst == conn_dst && r->cookie == msg->cookie_reply) { - if (r->sync) { + list_del_init(&r->entry); + if (r->sync) *reply_wake = kdbus_conn_reply_ref(r); - } else { - list_del_init(&r->entry); + else kdbus_conn_reply_unref(r); - } allowed = true; break; -- 2.34.1