diff options
author | Dhoat Harpal <hdhoat@codeaurora.org> | 2017-05-12 20:33:21 +0530 |
---|---|---|
committer | Dhoat Harpal <hdhoat@codeaurora.org> | 2017-06-19 21:49:09 +0530 |
commit | bb73294fb71f02da055bc3d6222b89ed7cd46291 (patch) | |
tree | 7fb2db3aa94cc2d4448c1c5c8cbfd79f66b3a6d2 /drivers | |
parent | d4041b86d5e341c82a4e5b0cd09f4edc7ecb068a (diff) |
soc: qcom: glink: Move ctx initialization of xprt ptr
In glink_open function, channel context initialization with transport
pointer is done quite after after its creation. This create race condition,
if parallel thread try to use transport pointer of ctx.
Ctx is initialized with transport pointer right at the time of its
creation.
CRs-Fixed: 2061645
Change-Id: Idcddf1ab10b8673a20bc1f23d8702bf870f79dbd
Signed-off-by: Dhoat Harpal <hdhoat@codeaurora.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/soc/qcom/glink.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/soc/qcom/glink.c b/drivers/soc/qcom/glink.c index 29e67d9fa389..ee0fe1622645 100644 --- a/drivers/soc/qcom/glink.c +++ b/drivers/soc/qcom/glink.c @@ -1935,6 +1935,7 @@ check_ctx: kfree(flcid); } + ctx->transport_ptr = xprt_ctx; list_add_tail(&ctx->port_list_node, &xprt_ctx->channels); GLINK_INFO_PERF_CH_XPRT(ctx, xprt_ctx, @@ -2640,7 +2641,6 @@ void *glink_open(const struct glink_open_config *cfg) ctx->local_xprt_req = best_id; ctx->no_migrate = cfg->transport && !(cfg->options & GLINK_OPT_INITIAL_XPORT); - ctx->transport_ptr = transport_ptr; ctx->local_open_state = GLINK_CHANNEL_OPENING; GLINK_INFO_PERF_CH(ctx, "%s: local:GLINK_CHANNEL_CLOSED->GLINK_CHANNEL_OPENING\n", |