From: Petr Pavlu <petr.pavlu@suse.com>
To: Luis Chamberlain <mcgrof@kernel.org>,
Petr Pavlu <petr.pavlu@suse.com>,
Daniel Gomez <da.gomez@kernel.org>,
Sami Tolvanen <samitolvanen@google.com>
Cc: Aaron Tomlin <atomlin@atomlin.com>,
linux-modules@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v3 0/6] module/dups: Fix a use-after-free and improve the code
Date: Thu, 6 Aug 2026 11:10:14 +0200 [thread overview]
Message-ID: <20260806-module-stats-rcu-v3-0-2b0331106f00@suse.com> (raw)
Simplify how the kmod dups code informs duplicate requests about the
result, fix a potential use-after-free when waiting on a duplicate request,
and make several general improvements to the code.
Note that the use-after-free fix depends on the code simplification
implemented in the first patch.
---
Changes in v3:
- Add received Reviewed-by tags.
- Rebase the series on modules-next.
- Link to v2: https://patch.msgid.link/20260723-module-stats-rcu-v2-0-bd582261fae3@suse.com
Changes in v2:
- Fix handling of concurrent request_module_nowait() and request_module()
calls.
- Avoid unnecessary kmod_dup_req allocations.
- Avoid mixing goto with scope-based cleanup.
- Link to v1: https://patch.msgid.link/20260720121621.750661-1-petr.pavlu@suse.com
---
Petr Pavlu (6):
module/dups: Inform duplicate requests about the result directly
module/dups: Fix use-after-free in kmod_dup_req lifetime handling
module/dups: Avoid unnecessary kmod_dup_req allocations
module/dups: Use scope-based cleanup helpers
module/dups: Use strcmp() to compare module names
module/dups: Clean up includes
kernel/module/dups.c | 169 +++++++++++++++++++++++----------------------------
1 file changed, 77 insertions(+), 92 deletions(-)
---
base-commit: 2600d43b235b029d0ba4f2d3cc71e2137114fde3
change-id: 20260722-module-stats-rcu-ff0dfc986be6
next reply other threads:[~2026-08-06 9:11 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-06 9:10 Petr Pavlu [this message]
2026-08-06 9:10 ` [PATCH v3 1/6] module/dups: Inform duplicate requests about the result directly Petr Pavlu
2026-08-06 9:25 ` sashiko-bot
2026-08-06 11:19 ` Petr Pavlu
2026-08-06 9:10 ` [PATCH v3 2/6] module/dups: Fix use-after-free in kmod_dup_req lifetime handling Petr Pavlu
2026-08-06 9:10 ` [PATCH v3 3/6] module/dups: Avoid unnecessary kmod_dup_req allocations Petr Pavlu
2026-08-06 9:42 ` sashiko-bot
2026-08-06 11:20 ` Petr Pavlu
2026-08-06 9:10 ` [PATCH v3 4/6] module/dups: Use scope-based cleanup helpers Petr Pavlu
2026-08-06 9:10 ` [PATCH v3 5/6] module/dups: Use strcmp() to compare module names Petr Pavlu
2026-08-06 9:10 ` [PATCH v3 6/6] module/dups: Clean up includes Petr Pavlu
2026-08-06 11:53 ` [PATCH v3 0/6] module/dups: Fix a use-after-free and improve the code Petr Pavlu
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=20260806-module-stats-rcu-v3-0-2b0331106f00@suse.com \
--to=petr.pavlu@suse.com \
--cc=atomlin@atomlin.com \
--cc=da.gomez@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-modules@vger.kernel.org \
--cc=mcgrof@kernel.org \
--cc=samitolvanen@google.com \
/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