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: <ab308c135c3ea5e050bbfb0b94a832c8d52d5380.camel@crapouillou.net>
Date: Thu, 02 Jan 2025 13:53:47 +0100
From: Paul Cercueil <paul@...pouillou.net>
To: "H. Nikolaus Schaller" <hns@...delico.com>, Vinod Koul
 <vkoul@...nel.org>,  Kishon Vijay Abraham I	 <kishon@...nel.org>, Zhou
 Yanjie <zhouyanjie@...yeetech.com>
Cc: linux-phy@...ts.infradead.org, linux-kernel@...r.kernel.org, 
	letux-kernel@...nphoenux.org, kernel@...a-handheld.com, 
	linux-mips@...r.kernel.org
Subject: Re: [PATCH RESEND] phy: ingenic: fix unbalanced regulator_disable()
 warning

Hi Nikolaus,

Le dimanche 29 décembre 2024 à 15:22 +0100, H. Nikolaus Schaller a
écrit :
> if ingenic_usb_phy_exit is called the regulator is already disabled
> through ingenic_usb_phy_power_off() leading to
> 
> [    5.367301] WARNING: CPU: 0 PID: 20 at
> drivers/regulator/core.c:2953 _regulator_disable+0x200/0x230
> [    5.368209] unbalanced disables for regulator-dummy
> [    5.370364] Modules linked in: phy_ingenic_usb
> ...
> [    5.373441] [<8054601c>] regulator_disable+0x40/0x80
> [    5.372952] [<c02450f8>] ingenic_usb_phy_exit+0x48/0x60
> [phy_ingenic_usb]
> [    5.374283] [<8050839c>] phy_exit+0xd8/0x104
> [    5.373104] [<80657a24>] __dwc2_lowlevel_hw_disable+0xe0/0xe8
> [    5.373393] [<80658ad4>] dwc2_driver_probe+0x818/0x834
> ...
> 
> Signed-off-by: H. Nikolaus Schaller <hns@...delico.com>

Looks good to me. The regulator is not enabled in
ingenic_usb_phy_init(), so it should not be disabled in
ingenic_usb_phy_exit().

Reviewed-by: Paul Cercueil <paul@...pouillou.net>

Cheers,
-Paul


> ---
> 
> Notes:
>     Resent because linux-mips@...r.kernel.org was not automatically
> added by
>     get_maintainer.pl (drivers/phy/ingenic missing in MAINTAINERS
> record?)
> 
>  drivers/phy/ingenic/phy-ingenic-usb.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/phy/ingenic/phy-ingenic-usb.c
> b/drivers/phy/ingenic/phy-ingenic-usb.c
> index eb2721f72a4c1..35984dd8a1bd7 100644
> --- a/drivers/phy/ingenic/phy-ingenic-usb.c
> +++ b/drivers/phy/ingenic/phy-ingenic-usb.c
> @@ -124,7 +124,6 @@ static int ingenic_usb_phy_exit(struct phy *phy)
>  	struct ingenic_usb_phy *priv = phy_get_drvdata(phy);
>  
>  	clk_disable_unprepare(priv->clk);
> -	regulator_disable(priv->vcc_supply);
>  
>  	return 0;
>  }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ