Re: Re: [PATCH] lkdtm/core: fix resource leaks on module init error path
From: Jiangshan Yi
Date: Tue Aug 04 2026 - 22:30:48 EST
Hi,
Thanks for the build test report and for catching these section mismatch
warnings:
> > > WARNING: modpost: drivers/misc/lkdtm/lkdtm: section mismatch in reference: lkdtm_module_init+0x221 (section: .init.text) -> lkdtm_heap_exit (section: .exit.text)
> > > WARNING: modpost: drivers/misc/lkdtm/lkdtm: section mismatch in reference: lkdtm_module_init+0x226 (section: .init.text) -> lkdtm_usercopy_exit (section: .exit.text)
These warnings have already been addressed in the v2 of this patch,
posted at:
https://lore.kernel.org/all/20260730154911.3164527-1-yijiangshan@xxxxxxxxxx/
In v2, the error-handling path in lkdtm_module_init() no longer
references the .exit.text cleanup helpers (lkdtm_heap_exit,
lkdtm_usercopy_exit), which resolves the section mismatch reported
by modpost.
Since the fix is part of a new version of the same patch rather than a
separate commit, I haven't added the Reported-by / Closes tags to
that version. However, your report was very helpful in confirming the
issue — thank you again for the testing.
Best regards,
Jiangshan Yi