From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752822AbdJaE1U (ORCPT ); Tue, 31 Oct 2017 00:27:20 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:43012 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752699AbdJaE1T (ORCPT ); Tue, 31 Oct 2017 00:27:19 -0400 X-Google-Smtp-Source: ABhQp+QaJ8zpN0HwfOdVS9Xujohk5cKvfIz4pJxVzLuEArpIxXeR5oZmmRS0Jy594k4bdyZb5ssb0Q== Date: Mon, 30 Oct 2017 21:27:15 -0700 From: Bjorn Andersson To: Arun Kumar Neelakantam Cc: ohad@wizery.com, sricharan@codeaurora.org, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH V1] rpmsg: glink: Initialize the "intent_req_comp" completion variable Message-ID: <20171031042715.GL1275@minitux> References: <1509342085-15185-1-git-send-email-aneela@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1509342085-15185-1-git-send-email-aneela@codeaurora.org> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun 29 Oct 22:41 PDT 2017, Arun Kumar Neelakantam wrote: > 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 Thanks, applied. Regards, Bjorn > --- > 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 >