From: sashiko-bot@kernel.org
To: "Marek Szyprowski" <m.szyprowski@samsung.com>
Cc: linux-clk@vger.kernel.org
Subject: Re: [RFC/PATCH] clk: add lockdep_ignore_clk_prepare_lock cmdline option
Date: Fri, 28 Aug 2026 13:23:46 +0000 [thread overview]
Message-ID: <20260828132346.E33271F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260828131409.962825-1-m.szyprowski@samsung.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] The conditionally compiled `__setup` parameter leaks to the init process when CONFIG_LOCKDEP is disabled, breaking systemd boots.
--
commit 85a755ef5489c876625f9877594712083467cf23
Author: Marek Szyprowski <m.szyprowski@samsung.com>
clk: add lockdep_ignore_clk_prepare_lock cmdline option
This commit introduces a new kernel command line parameter,
lockdep_ignore_clk_prepare_lock, to skip dependency tracking for the
prepare_lock class in the clock subsystem. This helps prevent lockdep
from turning itself off due to false positive circular dependencies.
> diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
> index 048adfa86a5d0..adf7d83c854a9 100644
> --- a/drivers/clk/clk.c
> +++ b/drivers/clk/clk.c
> @@ -117,6 +117,17 @@ struct clk {
> struct hlist_node clks_node;
> };
>
> +#ifdef CONFIG_LOCKDEP
> +static int __init lockdep_ignore_clk_prepare_lock_setup(char *__unused)
> +{
> + lockdep_set_novalidate_class(&prepare_lock);
> + pr_warn("lockdep: ignoring prepare_lock class in clock subsystem\n");
> + return 1;
> +}
> +__setup("lockdep_ignore_clk_prepare_lock",
> + lockdep_ignore_clk_prepare_lock_setup);
> +#endif
[Severity: High]
Will this break the boot process if a user passes the parameter on a kernel
built without CONFIG_LOCKDEP?
Because the __setup() macro is conditionally compiled inside the
#ifdef CONFIG_LOCKDEP block, the parameter handler is completely omitted when
lockdep is disabled.
When this happens, the kernel treats the unrecognized parameter as an unknown
positional argument and passes it to the init process.
Standard init systems like systemd strictly interpret unknown positional
arguments as the default boot target (for example, attempting to load
lockdep_ignore_clk_prepare_lock.target). Since this target does not exist,
the system will fail to boot and instead drop into an emergency shell.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260828131409.962825-1-m.szyprowski@samsung.com?part=1
next prev parent reply other threads:[~2026-08-28 13:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20260828131428eucas1p2cc2d9767d5ed62b8297c2cff0295226d@eucas1p2.samsung.com>
2026-08-28 13:14 ` [RFC/PATCH] clk: add lockdep_ignore_clk_prepare_lock cmdline option Marek Szyprowski
2026-08-28 13:23 ` sashiko-bot [this message]
2026-08-28 13:38 ` Peter Zijlstra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260828132346.E33271F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox