diff options
author | Arun Kumar Neelakantam <aneela@codeaurora.org> | 2017-10-30 11:11:24 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-12-20 10:10:29 +0100 |
commit | 81309f8b9b69913233733ed61c4c87dab5436902 (patch) | |
tree | e7546f9e20349fc5940623a937d6f1e491980df7 /drivers/rpmsg/qcom_glink_native.c | |
parent | 7291d99ebc67be887e5c915489706e6fe720992a (diff) |
rpmsg: glink: Initialize the "intent_req_comp" completion variable
[ Upstream commit 2394facb17bcace4b3c19b50202177a5d8903b64 ]
The "intent_req_comp" variable is used without initialization which
results in NULL pointer dereference in qcom_glink_request_intent().
we need to initialize the completion variable before using it.
Fixes: 27b9c5b66b23 ("rpmsg: glink: Request for intents when unavailable")
Signed-off-by: Arun Kumar Neelakantam <aneela@codeaurora.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/rpmsg/qcom_glink_native.c')
-rw-r--r-- | drivers/rpmsg/qcom_glink_native.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/rpmsg/qcom_glink_native.c b/drivers/rpmsg/qcom_glink_native.c index e3242a0925a6..e8e12c2b1d0e 100644 --- a/drivers/rpmsg/qcom_glink_native.c +++ b/drivers/rpmsg/qcom_glink_native.c @@ -227,6 +227,7 @@ static struct glink_channel *qcom_glink_alloc_channel(struct qcom_glink *glink, init_completion(&channel->open_req); init_completion(&channel->open_ack); + init_completion(&channel->intent_req_comp); INIT_LIST_HEAD(&channel->done_intents); INIT_WORK(&channel->intent_work, qcom_glink_rx_done_work); |