From: Markus Elfring <Markus.Elfring@web.de>
To: Miaoqian Lin <linmq006@gmail.com>,
dmaengine@vger.kernel.org, linux-arm-msm@vger.kernel.org,
Dmitry Baryshkov <lumag@kernel.org>,
Jyothi Kumar Seerapu <quic_jseerapu@quicinc.com>,
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
Neil Armstrong <neil.armstrong@linaro.org>,
Vinod Koul <vkoul@kernel.org>
Cc: stable@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] dma: qcom: gpi: Fix memory leak in gpi_peripheral_config()
Date: Wed, 29 Oct 2025 18:32:05 +0100 [thread overview]
Message-ID: <6069f4ab-252e-4f83-8c8f-cbab4ae8cd94@web.de> (raw)
In-Reply-To: <20251029123421.91973-1-linmq006@gmail.com>
…
> +++ b/drivers/dma/qcom/gpi.c
> @@ -1605,14 +1605,16 @@ static int
> gpi_peripheral_config(struct dma_chan *chan, struct dma_slave_config *config)
> {
…
> + new_config = krealloc(gchan->config, config->peripheral_size, GFP_NOWAIT);
> + if (!new_config)
> return -ENOMEM;
>
> + gchan->config = new_config;
> memcpy(gchan->config, config->peripheral_config, config->peripheral_size);
How do you think about to apply the following source code variant?
gchan->config = memcpy(new_config, config->peripheral_config, config->peripheral_size);
Regards,
Markus
next prev parent reply other threads:[~2025-10-29 17:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-29 12:34 [PATCH] dma: qcom: gpi: Fix memory leak in gpi_peripheral_config() Miaoqian Lin
2025-10-29 15:50 ` Bjorn Andersson
2025-10-29 17:32 ` Markus Elfring [this message]
2025-12-23 11:23 ` 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=6069f4ab-252e-4f83-8c8f-cbab4ae8cd94@web.de \
--to=markus.elfring@web.de \
--cc=dmaengine@vger.kernel.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linmq006@gmail.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lumag@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=quic_jseerapu@quicinc.com \
--cc=stable@vger.kernel.org \
--cc=vkoul@kernel.org \
/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