Skip to content

Commit

Permalink
rpmsg: glink: Initialize the "intent_req_comp" completion variable
Browse files Browse the repository at this point in the history
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: 27b9c5b ("rpmsg: glink: Request for intents when unavailable")
Signed-off-by: Arun Kumar Neelakantam <[email protected]>
Signed-off-by: Bjorn Andersson <[email protected]>
  • Loading branch information
Arun Kumar Neelakantam authored and andersson committed Oct 31, 2017
1 parent 4d91d7b commit 2394fac
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/rpmsg/qcom_glink_native.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 2394fac

Please sign in to comment.