Re: Re: [PATCH] lkdtm/core: fix resource leaks on module init error path

From: Philip Li

Date: Tue Aug 11 2026 - 01:12:49 EST


On Mon, Aug 10, 2026 at 09:48:15AM +0800, Jiangshan Yi wrote:
> Hi,
>
> Thanks for the build test report and for catching these section mismatch
> warnings:
>
> > All warnings (new ones prefixed by >>, old ones prefixed by <<):
> >
> > WARNING: modpost: "saved_config" [vmlinux] is COMMON symbol
> > >> WARNING: modpost: vmlinux: section mismatch in reference: lkdtm_module_init+0x1ec (section: .init.text) -> lkdtm_heap_exit (section: .exit.text)
> > WARNING: modpost: vmlinux: section mismatch in reference: lkdtm_module_init+0x1f0 (section: .init.text) -> lkdtm_heap_exit (section: .exit.text)
> > >> WARNING: modpost: vmlinux: section mismatch in reference: lkdtm_module_init+0x1fc (section: .init.text) -> lkdtm_usercopy_exit (section: .exit.text)
> > WARNING: modpost: vmlinux: section mismatch in reference: lkdtm_module_init+0x200 (section: .init.text) -> lkdtm_usercopy_exit (section: .exit.text)
> >
> > --
> > 0-DAY CI Kernel Test Service
> > https://github.com/intel/lkp-tests/wiki
>
> These warnings have already been addressed in the v2 of this patch,
> posted at:
>
> https://lore.kernel.org/all/20260730154911.3164527-1-yijiangshan@xxxxxxxxxx/

Sorry about the noise, the bot doesn't recognize the v2 correctly, we will
fix it to avoid false positive.

>
> 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
>