soc: qcom: glink: Modify glink logging in tx_common

Glink log in tx_common uses context based logging after
wait_for_completion_timeout. This can lead to use after free
scenerio, since transport of context can be freed during wait time.

Use glink error logging.

CRs-Fixed: 2164929
Change-Id: If66bcb7cba1772c2648c143f43a3b88af0799844
Signed-off-by: Dhoat Harpal <hdhoat@codeaurora.org>
This commit is contained in:
Dhoat Harpal 2017-12-28 16:03:16 +05:30 committed by Gerrit - the friendly Code Review server
parent 55cc722ec6
commit 5916f7a1f2

View file

@ -1,4 +1,4 @@
/* Copyright (c) 2014-2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2014-2018, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@ -2991,7 +2991,7 @@ static int glink_tx_common(void *handle, void *pkt_priv,
if (!wait_for_completion_timeout(
&ctx->int_req_ack_complete,
ctx->rx_intent_req_timeout_jiffies)) {
GLINK_ERR_CH(ctx,
GLINK_ERR(
"%s: Intent request ack with size: %zu not granted for lcid\n",
__func__, size);
ret = -ETIMEDOUT;
@ -3011,7 +3011,7 @@ static int glink_tx_common(void *handle, void *pkt_priv,
if (!wait_for_completion_timeout(
&ctx->int_req_complete,
ctx->rx_intent_req_timeout_jiffies)) {
GLINK_ERR_CH(ctx,
GLINK_ERR(
"%s: Intent request with size: %zu not granted for lcid\n",
__func__, size);
ret = -ETIMEDOUT;