Files
linux/kernel/module
Petr Pavlu a7b4bc094f module: Remove duplicate freeing of lockdep classes
In the error path of load_module(), under the free_module label, the
code calls lockdep_free_key_range() to release lock classes associated
with the MOD_DATA, MOD_RODATA and MOD_RO_AFTER_INIT module regions, and
subsequently invokes module_deallocate().

Since commit ac3b432839 ("module: replace module_layout with
module_memory"), the module_deallocate() function calls free_mod_mem(),
which releases the lock classes as well and considers all module
regions.

Attempting to free these classes twice is unnecessary. Remove the
redundant code in load_module().

Fixes: ac3b432839 ("module: replace module_layout with module_memory")
Signed-off-by: Petr Pavlu <[email protected]>
Reviewed-by: Daniel Gomez <[email protected]>
Reviewed-by: Aaron Tomlin <[email protected]>
Acked-by: Song Liu <[email protected]>
Acked-by: Peter Zijlstra (Intel) <[email protected]>
Signed-off-by: Sami Tolvanen <[email protected]>
2026-02-23 17:44:54 +00:00
..
2023-03-09 11:08:24 +01:00
2024-08-08 17:36:35 +02:00
…
2025-03-10 11:54:44 +01:00