On Wed, Jan 7, 2026 at 4:24 AM Petr Pavlu <[email protected]> wrote: > > 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 ac3b43283923 ("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(). > > Signed-off-by: Petr Pavlu <[email protected]>
Acked-by: Song Liu <[email protected]> Thanks for the fix!

