ENUM FAIL_DUP_MOD_REASON(9)
π enum fail_dup_mod_reason(9) π
okay so bestie, welcome to the Kernel API Manual β¨ this page is about enum fail_dup_mod_reason and it's literally the story of that one moment when the kernel is like "waitβ¦ didn't I just see you?!" π no cap, it's the state at which a duplicate module was detected. main character energy for sure π
β¨ NAME β¨
enum fail_dup_mod_reason β the state at which a duplicate module was detected. that's the whole vibe check π
β¨ SYNOPSIS β¨
enum fail_dup_mod_reason {
FAIL_DUP_MOD_BECOMING ,
FAIL_DUP_MOD_LOAD
};
β¨ Constants β¨
FAIL_DUP_MOD_BECOMINGβ okay so picture this: the module has been read properly πΈ and it passes all the checks, but then we determine that another module with the same name is already loaded, or is being processed on our modules list π. this happens onearly_mod_checkright beforelayout_and_allocate. and like β the kernel would have alreadyvmalloc'd space for the entire module throughfinit_moduleat this point π. if decompression was used, twovmapspaces were used. these failures can happen when userspace has not seen the module present on the kernel and tries to load the module multiple times at same time. messy, but it happens πFAIL_DUP_MOD_LOADβ highkey the more dramatic sibling π«Ά. the module has been read properly, passes all validation checks, and the kernel determines that the module was unique β and because of this allocated yet another private kernel copy of the module space inlayout_and_allocateβ but after this, determined inadd_unformed_modulethat another module with the same name is already loaded or being processed π¦. these failures should be mitigated as much as possible and are indicative of really fast races in loading modules π₯. without module decompression they waste twice as muchvmapspace. with module decompression, three times the module's sizevmapspace is wasted ππ
bestie. wasted vmap space is not the aesthetic. mitigate these races fr fr π
β¨ SEE ALSO β¨
- Kernel file
./kernel/module/internal.hβ
kisses, bestie π this icon of a page lives in ./kernel/module, dated October 2026, and it ATE π go forth and never load the same module twice at the same time π§β¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms