From: Sinan Kaya <okaya@codeaurora.org>
To: Anton Vasilyev <vasilyev@ispras.ru>, Andy Gross <andy.gross@linaro.org>
Cc: David Brown <david.brown@linaro.org>,
Dan Williams <dan.j.williams@intel.com>,
Vinod Koul <vinod.koul@intel.com>,
linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org,
dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org,
ldv-project@linuxtesting.org
Subject: Re: [PATCH] dmaengine: qcom_hidma: avoid freeing an uninitialized pointer
Date: Thu, 10 Aug 2017 12:17:47 -0400 [thread overview]
Message-ID: <b1a2dd0d-6723-bfc3-ae6c-ae4d1f8d4f3b@codeaurora.org> (raw)
In-Reply-To: <1502380465-13434-1-git-send-email-vasilyev@ispras.ru>
On 8/10/2017 11:54 AM, Anton Vasilyev wrote:
> If device_node np doesn't contain child or first child doesn't have
> property "reg" then hidma_mgmt_of_populate_channels() perfoms
> deallocation on uninitialized local variable res.
>
> The patch adds res initialization by NULL.
>
> Found by Linux Driver Verification project (linuxtesting.org).
>
> Signed-off-by: Anton Vasilyev <vasilyev@ispras.ru>
> ---
> drivers/dma/qcom/hidma_mgmt.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/dma/qcom/hidma_mgmt.c b/drivers/dma/qcom/hidma_mgmt.c
> index 5a0991b..89e36e3 100644
> --- a/drivers/dma/qcom/hidma_mgmt.c
> +++ b/drivers/dma/qcom/hidma_mgmt.c
> @@ -354,7 +354,7 @@ static int __init hidma_mgmt_of_populate_channels(struct device_node *np)
> struct platform_device_info pdevinfo;
> struct of_phandle_args out_irq;
> struct device_node *child;
> - struct resource *res;
> + struct resource *res = NULL;
> const __be32 *cell;
> int ret = 0, size, i, num;
> u64 addr, addr_size;
>
Reviewed-by: Sinan Kaya <okaya@codeaurora.org>
--
Sinan Kaya
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.
next prev parent reply other threads:[~2017-08-10 16:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-10 15:54 Anton Vasilyev
2017-08-10 16:17 ` Sinan Kaya [this message]
2017-08-21 16:21 ` Vinod Koul
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b1a2dd0d-6723-bfc3-ae6c-ae4d1f8d4f3b@codeaurora.org \
--to=okaya@codeaurora.org \
--cc=andy.gross@linaro.org \
--cc=dan.j.williams@intel.com \
--cc=david.brown@linaro.org \
--cc=dmaengine@vger.kernel.org \
--cc=ldv-project@linuxtesting.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-soc@vger.kernel.org \
--cc=vasilyev@ispras.ru \
--cc=vinod.koul@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®