All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: dwc_eth_qos: fix double resource leak in eqos_remove()
@ 2022-05-11 14:12 Rasmus Villemoes
  2022-05-16  0:26 ` Ramon Fried
  2022-08-08 19:07 ` Tom Rini
  0 siblings, 2 replies; 4+ messages in thread
From: Rasmus Villemoes @ 2022-05-11 14:12 UTC (permalink / raw)
  To: u-boot; +Cc: Joe Hershberger, Ramon Fried, Tom Rini, Rasmus Villemoes

Not only does eqos_remove() fail to free the buffers that have been
allocated by eqos_probe_resources_core(), it repeats those allocations
and thus drops twice as much memory on the floor.

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
---
 drivers/net/dwc_eth_qos.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/dwc_eth_qos.c b/drivers/net/dwc_eth_qos.c
index 9d255cf95f..82ee2d9706 100644
--- a/drivers/net/dwc_eth_qos.c
+++ b/drivers/net/dwc_eth_qos.c
@@ -1884,7 +1884,7 @@ static int eqos_remove(struct udevice *dev)
 	eqos->config->ops->eqos_stop_clks(dev);
 	eqos->config->ops->eqos_remove_resources(dev);
 
-	eqos_probe_resources_core(dev);
+	eqos_remove_resources_core(dev);
 
 	debug("%s: OK\n", __func__);
 	return 0;
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] net: dwc_eth_qos: fix double resource leak in eqos_remove()
  2022-05-11 14:12 [PATCH] net: dwc_eth_qos: fix double resource leak in eqos_remove() Rasmus Villemoes
@ 2022-05-16  0:26 ` Ramon Fried
  2022-08-04 12:48   ` Rasmus Villemoes
  2022-08-08 19:07 ` Tom Rini
  1 sibling, 1 reply; 4+ messages in thread
From: Ramon Fried @ 2022-05-16  0:26 UTC (permalink / raw)
  To: Rasmus Villemoes; +Cc: U-Boot Mailing List, Joe Hershberger, Tom Rini

On Wed, May 11, 2022 at 5:13 PM Rasmus Villemoes
<rasmus.villemoes@prevas.dk> wrote:
>
> Not only does eqos_remove() fail to free the buffers that have been
> allocated by eqos_probe_resources_core(), it repeats those allocations
> and thus drops twice as much memory on the floor.
>
> Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
> ---
>  drivers/net/dwc_eth_qos.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/dwc_eth_qos.c b/drivers/net/dwc_eth_qos.c
> index 9d255cf95f..82ee2d9706 100644
> --- a/drivers/net/dwc_eth_qos.c
> +++ b/drivers/net/dwc_eth_qos.c
> @@ -1884,7 +1884,7 @@ static int eqos_remove(struct udevice *dev)
>         eqos->config->ops->eqos_stop_clks(dev);
>         eqos->config->ops->eqos_remove_resources(dev);
>
> -       eqos_probe_resources_core(dev);
> +       eqos_remove_resources_core(dev);
>
>         debug("%s: OK\n", __func__);
>         return 0;
> --
> 2.31.1
>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] net: dwc_eth_qos: fix double resource leak in eqos_remove()
  2022-05-16  0:26 ` Ramon Fried
@ 2022-08-04 12:48   ` Rasmus Villemoes
  0 siblings, 0 replies; 4+ messages in thread
From: Rasmus Villemoes @ 2022-08-04 12:48 UTC (permalink / raw)
  To: Ramon Fried; +Cc: U-Boot Mailing List, Joe Hershberger, Tom Rini

On 16/05/2022 02.26, Ramon Fried wrote:
> On Wed, May 11, 2022 at 5:13 PM Rasmus Villemoes
> <rasmus.villemoes@prevas.dk> wrote:
>>
>> Not only does eqos_remove() fail to free the buffers that have been
>> allocated by eqos_probe_resources_core(), it repeats those allocations
>> and thus drops twice as much memory on the floor.
>>
> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>

ping on this as well.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] net: dwc_eth_qos: fix double resource leak in eqos_remove()
  2022-05-11 14:12 [PATCH] net: dwc_eth_qos: fix double resource leak in eqos_remove() Rasmus Villemoes
  2022-05-16  0:26 ` Ramon Fried
@ 2022-08-08 19:07 ` Tom Rini
  1 sibling, 0 replies; 4+ messages in thread
From: Tom Rini @ 2022-08-08 19:07 UTC (permalink / raw)
  To: Rasmus Villemoes; +Cc: u-boot, Joe Hershberger, Ramon Fried

[-- Attachment #1: Type: text/plain, Size: 435 bytes --]

On Wed, May 11, 2022 at 04:12:50PM +0200, Rasmus Villemoes wrote:

> Not only does eqos_remove() fail to free the buffers that have been
> allocated by eqos_probe_resources_core(), it repeats those allocations
> and thus drops twice as much memory on the floor.
> 
> Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>

Applied to u-boot/master, thanks!

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-08-08 19:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-11 14:12 [PATCH] net: dwc_eth_qos: fix double resource leak in eqos_remove() Rasmus Villemoes
2022-05-16  0:26 ` Ramon Fried
2022-08-04 12:48   ` Rasmus Villemoes
2022-08-08 19:07 ` Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.