From: sashiko-bot@kernel.org
To: "Petr Pavlu" <petr.pavlu@suse.com>
Cc: linux-modules@vger.kernel.org
Subject: Re: [PATCH 5/5] module/dups: Clean up includes
Date: Mon, 20 Jul 2026 12:32:43 +0000 [thread overview]
Message-ID: <20260720123244.4F8D01F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260720121621.750661-6-petr.pavlu@suse.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The function `kmod_dup_request_exists_wait()` mixes `goto`-based error/cleanup handling with `scoped_guard()` declarations, violating subsystem guidelines.
--
--- Patch [5]: [PATCH 5/5] module/dups: Clean up includes ---
commit 94d1ce7350f8ea78793315796cdc680daf4e1298
Author: Petr Pavlu <petr.pavlu@suse.com>
module/dups: Clean up includes
This patch cleans up the #include directives in kernel/module/dups.c.
It explicitly includes the headers for all definitions and functions
relied upon by the file.
> diff --git a/kernel/module/dups.c b/kernel/module/dups.c
> index 43cec4cec4fdb..76faa662f14d8 100644
> --- a/kernel/module/dups.c
> +++ b/kernel/module/dups.c
> @@ -7,30 +7,22 @@
>
> #define pr_fmt(fmt) "module: " fmt
>
> +#include <linux/bug.h>
> +#include <linux/cleanup.h>
[Severity: Low]
Does kmod_dup_request_exists_wait() violate the cleanup subsystem guidelines
by mixing goto labels and scoped_guard() declarations?
kernel/module/dups.c:kmod_dup_request_exists_wait() {
...
scoped_guard(mutex, &kmod_dup_mutex) {
kmod_req = kmod_dup_request_lookup(module_name);
if (kmod_req) {
get_kmod_req(kmod_req);
goto dup_req;
}
...
}
...
dup_req:
...
if (!wait) {
...
goto out;
}
...
out:
put_kmod_req(kmod_req);
return true;
}
The cleanup subsystem guidelines expect that usage of goto and cleanup
helpers are never mixed in the same function.
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260720121621.750661-1-petr.pavlu@suse.com?part=5
prev parent reply other threads:[~2026-07-20 12:32 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-20 12:15 [PATCH 0/5] module/dups: Fix a use-after-free and improve the code Petr Pavlu
2026-07-20 12:15 ` [PATCH 1/5] module/dups: Fix use-after-free in kmod_dup_req lifetime handling Petr Pavlu
2026-07-20 12:32 ` sashiko-bot
2026-07-20 13:28 ` Petr Pavlu
2026-07-20 12:15 ` [PATCH 2/5] module/dups: Inform duplicate requests about the result directly Petr Pavlu
2026-07-20 12:28 ` sashiko-bot
2026-07-20 12:15 ` [PATCH 3/5] module/dups: Use scoped guards for kmod_dup_mutex Petr Pavlu
2026-07-20 12:25 ` sashiko-bot
2026-07-20 13:28 ` Petr Pavlu
2026-07-20 12:15 ` [PATCH 4/5] module/dups: Use strcmp() to compare module names Petr Pavlu
2026-07-20 12:15 ` [PATCH 5/5] module/dups: Clean up includes Petr Pavlu
2026-07-20 12:32 ` sashiko-bot [this message]
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=20260720123244.4F8D01F00A3A@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-modules@vger.kernel.org \
--cc=petr.pavlu@suse.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