From patchwork Mon Oct 30 05:41:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arun Kumar Neelakantam X-Patchwork-Id: 10032095 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5F0C86039A for ; Mon, 30 Oct 2017 05:41:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 537A4287AB for ; Mon, 30 Oct 2017 05:41:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 47EE7287B3; Mon, 30 Oct 2017 05:41:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C5CB2287AB for ; Mon, 30 Oct 2017 05:41:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752087AbdJ3Fli (ORCPT ); Mon, 30 Oct 2017 01:41:38 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:56020 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752157AbdJ3Flh (ORCPT ); Mon, 30 Oct 2017 01:41:37 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 12AB960585; Mon, 30 Oct 2017 05:41:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1509342097; bh=cNF2V01ZOYJywenjBezrIocVY+tUWo0VZbusDWVKTm8=; h=From:To:Cc:Subject:Date:From; b=n+MBH2btO8EYzcAL7oh78MFYLI35Cgar1f6Tp/F1MbkMGC/WrT43rBLneAFPKz46u fYhq0nKUG2B6keLyg+/lYxOKX2tB6HB/ZOuF9nmkSzKaOwvgq9NwaIuf5+ZskkoBlE PyzFU2HT5I0ppXf+P36UkZSeAKhsYRRdvdViIY5s= Received: from aneelaka-linux.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: aneela@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id ABED16050D; Mon, 30 Oct 2017 05:41:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1509342096; bh=cNF2V01ZOYJywenjBezrIocVY+tUWo0VZbusDWVKTm8=; h=From:To:Cc:Subject:Date:From; b=eFJUxv/wvoi3o+juWqKgaxK52GjtTSlnBjgheZR47FkYBcskrulfeHR8o8oH+zIjF RRdP+m34zEPhX80qr/2mCprTRpirT7ni0HkgfR2eKOA+OUK3llR2KDzy7waGvl7Yzi PorgZ4krNjWjsj9bQfj6Ml9kL8JFYsJfXEZbpXeE= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org ABED16050D Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=aneela@codeaurora.org From: Arun Kumar Neelakantam To: ohad@wizery.com, bjorn.andersson@linaro.org, sricharan@codeaurora.org Cc: linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, Arun Kumar Neelakantam Subject: [PATCH V1] rpmsg: glink: Initialize the "intent_req_comp" completion variable Date: Mon, 30 Oct 2017 11:11:24 +0530 Message-Id: <1509342085-15185-1-git-send-email-aneela@codeaurora.org> X-Mailer: git-send-email 1.9.1 Sender: linux-remoteproc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-remoteproc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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);