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: <aSB_VoKvDUHDbNDb@hovoldconsulting.com>
Date: Fri, 21 Nov 2025 16:03:50 +0100
From: Johan Hovold <johan@...nel.org>
To: Krzysztof Kozlowski <krzk@...nel.org>
Cc: Alim Akhtar <alim.akhtar@...sung.com>,
	Peter Griffin <peter.griffin@...aro.org>,
	linux-samsung-soc@...r.kernel.org, linux-kernel@...r.kernel.org,
	stable@...r.kernel.org
Subject: Re: [PATCH] soc: samsung: exynos-pmu: fix device leak on regmap
 lookup

On Fri, Nov 21, 2025 at 01:59:59PM +0100, Krzysztof Kozlowski wrote:
> On 21/11/2025 13:18, Johan Hovold wrote:
> > Make sure to drop the reference taken when looking up the PMU device and
> > its regmap.
> > 
> > Note that holding a reference to a device does not prevent its regmap
> > from going away so there is no point in keeping the reference.

> > Fixes: 0b7c6075022c ("soc: samsung: exynos-pmu: Add regmap support for SoCs that protect PMU regs")
> > Cc: stable@...r.kernel.org	# 6.9
> 
> Fix is fine, but unfortunately the code in v6.9 was different and I
> believe keeping dev reference made sense there - driver was relying on
> drvdata. While the leak was there as well, it was intentional. I think
> the leak can be fixed only since commit
> 35d6b98c625867209bc47df99cf03edf4280799f .

It makes no difference actually as holding a reference to a device does
not prevent its driver data from going away either.

Johan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ