[PATCH v3 0/6] module/dups: Fix a use-after-free and improve the code
From: Petr Pavlu <petr.pavlu@suse.com>
Date: 2026-08-06 09:11:37
Also in:
lkml
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