Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9b28f92f authored by Chris Lew's avatar Chris Lew
Browse files

soc: qcom: glink: Fix ssr race condition in glink_close



Add else statement in glink_close for a race condition where the
xprt state is set to GLINK_XPRT_DOWN and glink_close runs before
the channel is migrated.

CRs-Fixed: 988266
Change-Id: I4de6530f1fbffd9f3acd1fa539cf756364ea32ac
Signed-off-by: default avatarChris Lew <clew@codeaurora.org>
parent c865f055
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -2630,6 +2630,13 @@ relock: xprt_ctx = ctx->transport_ptr;
			"channel Not closed yet local state [%d] remote_state [%d]\n",
			ctx->local_open_state, ctx->remote_opened);
		}
	} else {
		/*
		 * This case handles the scenario where glink_core_link_down
		 * changes the local_state to GLINK_XPRT_DOWN but glink_close
		 * gets the channel write lock before glink_core_channel_cleanup
		 */
		rwref_write_put(&ctx->ch_state_lhb2);
	}
	complete_all(&ctx->int_req_ack_complete);
	complete_all(&ctx->int_req_complete);