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] [thread-next>] [day] [month] [year] [list]
Message-ID: <886da76d-f04e-46a6-b854-2148f7f6068d@kernel.org>
Date: Sun, 25 Aug 2024 10:15:51 +0200
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Bartosz Golaszewski <brgl@...ev.pl>,
 Santosh Shilimkar <ssantosh@...nel.org>
Cc: linux-kernel@...r.kernel.org,
 Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
Subject: Re: [PATCH] Revert "memory: ti-aemif: don't needlessly iterate over
 child nodes"

On 24/08/2024 10:02, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
> 
> This reverts commit 23a641d5c2bce4c723fff9118a5d865ee6b9d05a.
> 
> The first-level children of the aemif node are not the device nodes (ones
> containing the 'compatible' property) but the chip-select nodes which
> instead have their own children.
> 
> of_platform_populate() will skip such nodes so we must indeed iterate
> over the direct children of the aemif node. The problem here is that we
> never call of_platform_depopulate() as it takes the root device as
> argument. We only have an unpopulated chip-select nodes so we will leak
> these devices if any of the calls to of_platform_populate() fails.
> 
> I don't have a batter idea right now but my patch was not correct so we
> need to revert it. While at it: at least use the scoped variant of the
> OF node iterator. Down the line, we should find a better solution to fix
> this potential resource leak in error path.
> 
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
> ---
>  drivers/memory/ti-aemif.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)

I'll drop the original commit, because my upstream (arm/soc) might
question this.

Best regards,
Krzysztof


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ