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 <dh.herrmann@gmail.com>
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;