From: Adrian Szyndela Date: Thu, 30 Sep 2021 06:44:57 +0000 (+0900) Subject: kdbus: don't unlink synchronous replies X-Git-Tag: submit/tizen/20220112.012135~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f36833053065e3e607e747d40f81cead512565a3;p=platform%2Fkernel%2Flinux-rpi3.git kdbus: don't unlink synchronous replies When a signal breaks a synchronous call, and a reply is received before restart is executed, then the reply is unlinked and the restarted call can't pick it up anymore. But keeping only interrupted synchronous calls linked is not enough. If a reply comes just after the signal, before marking the reply structure as interrupted, then the reply is - again - unlinked and the restarted call can't pick it up anymore. This commit leaves all synchronous replies linked. This way: - asynchronous calls work as before the changes - replies are unlinked by the replier in kdbus_conn_reply(); - replies for synchronous calls are unlinked by the caller in kdbus_conn_wait_reply(). Change-Id: I0e3d8f53cf24a0aa8c59244e0768eebeb3fee110 Signed-off-by: Adrian Szyndela --- diff --git a/ipc/kdbus/connection.c b/ipc/kdbus/connection.c index 02deba366839..a40be5fe4a44 100644 --- a/ipc/kdbus/connection.c +++ b/ipc/kdbus/connection.c @@ -1135,7 +1135,8 @@ static int kdbus_conn_reply(struct kdbus_conn *src, if (reply) { if (reply->sync) wake = kdbus_reply_ref(reply); - kdbus_reply_unlink(reply); + else + kdbus_reply_unlink(reply); } mutex_unlock(&dst->lock);