lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <6069f4ab-252e-4f83-8c8f-cbab4ae8cd94@web.de>
Date: Wed, 29 Oct 2025 18:32:05 +0100
From: Markus Elfring <Markus.Elfring@....de>
To: Miaoqian Lin <linmq006@...il.com>, dmaengine@...r.kernel.org,
 linux-arm-msm@...r.kernel.org, Dmitry Baryshkov <lumag@...nel.org>,
 Jyothi Kumar Seerapu <quic_jseerapu@...cinc.com>,
 Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
 Neil Armstrong <neil.armstrong@...aro.org>, Vinod Koul <vkoul@...nel.org>
Cc: stable@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] dma: qcom: gpi: Fix memory leak in
 gpi_peripheral_config()

…
> +++ 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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ