From 5916f7a1f2d3d335c9f047640c72aebe4c45fe84 Mon Sep 17 00:00:00 2001 From: Dhoat Harpal Date: Thu, 28 Dec 2017 16:03:16 +0530 Subject: [PATCH] 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 --- drivers/soc/qcom/glink.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/soc/qcom/glink.c b/drivers/soc/qcom/glink.c index b8464fdfd310..f21e9c4c4f4e 100644 --- a/drivers/soc/qcom/glink.c +++ b/drivers/soc/qcom/glink.c @@ -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;