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: <176913412868.4027.13825615091172956270@lazor>
Date: Thu, 22 Jan 2026 19:08:48 -0700
From: Stephen Boyd <sboyd@...nel.org>
To: Brian Masney <bmasney@...hat.com>, ping.gao <ping.gao@...sung.com>
Cc: mturquette@...libre.com, linux-clk@...r.kernel.org, linux-kernel@...r.kernel.org, hy50.seo@...sung.com, kwangwon.min@...sung.com
Subject: Re: [PATCH]     drivers: clk: keystone: Fix parameter judgment in clk_prepare

Quoting Brian Masney (2026-01-22 16:31:46)
> 
> Just to help Stephen: It looks like this is what ultimately causes the
> problem:
> 
> dw_mci_probe() in drivers/mmc/host/dw_mmc.c sets up host->ciu_clk, and
> if an error is returned by devm_clk_get(), it leaves the error pointer in
> host->ciu_clk, and the probe continues normally. Later
> dw_mci_runtime_resume() calls clk_prepare_enable() on host->ciu_clk with
> the error pointer.
> 
> Additionally, clk_unprepare() already has this IS_ERR_OR_NULL() check.
> 
> Stephen: Do you think that clk_enable() should also be updated as well?
> I see that clk_disable() also has the IS_ERR_OR_NULL() check.

No. We ignore error pointers in the disable and unprepare case to
simplify error paths, see commit  63589e92c2d9 ("clk: Ignore error and
NULL pointers passed to clk_{unprepare, disable}()"). With the usage of
devm though I'm not sure that error paths are a real thing anymore, but
it's nice to let drivers have one goto label instead of a million
different ones if they're not using devm.

Not ignoring error pointers in the enable and prepare path is
intentional. Fix the driver.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ