* [PATCH] rpmsg: glink: Initialize the "intent_req_comp" completion variable
@ 2017-10-27 10:45 Arun Kumar Neelakantam
2017-10-28 0:33 ` Chris Lew
0 siblings, 1 reply; 2+ messages in thread
From: Arun Kumar Neelakantam @ 2017-10-27 10:45 UTC (permalink / raw)
To: ohad, bjorn.andersson, sricharan
Cc: linux-remoteproc, linux-kernel, Arun Kumar Neelakantam
The "intent_req_comp" variable is used without initialization which
results in NULL pointer derefernce 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>
---
drivers/rpmsg/qcom_glink_native.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/rpmsg/qcom_glink_native.c b/drivers/rpmsg/qcom_glink_native.c
index 5dcc9bf..fcd46ab 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);
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] rpmsg: glink: Initialize the "intent_req_comp" completion variable
2017-10-27 10:45 [PATCH] rpmsg: glink: Initialize the "intent_req_comp" completion variable Arun Kumar Neelakantam
@ 2017-10-28 0:33 ` Chris Lew
0 siblings, 0 replies; 2+ messages in thread
From: Chris Lew @ 2017-10-28 0:33 UTC (permalink / raw)
To: Arun Kumar Neelakantam, ohad, bjorn.andersson, sricharan
Cc: linux-remoteproc, linux-kernel
On 10/27/2017 3:45 AM, Arun Kumar Neelakantam wrote:
> The "intent_req_comp" variable is used without initialization which
> results in NULL pointer derefernce in qcom_glink_request_intent().
>
Typo on dereference.
Thanks,
Chris
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-10-28 0:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-27 10:45 [PATCH] rpmsg: glink: Initialize the "intent_req_comp" completion variable Arun Kumar Neelakantam
2017-10-28 0:33 ` Chris Lew
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).