This series documents the -EEXIST error code reservation in the module
loader, building on Lucas's patches [1] that add the runtime safety net.

When module_init() returns -EEXIST, kmod interprets this as "module
already loaded" and reports success, hiding real init failures. Lucas's
patches warn and override this to -EBUSY. These patches document this
convention to prevent future cases.

This was originally reported in this thread [2].

Link: 
https://lore.kernel.org/all/[email protected]/
 [1]
Link: https://lore.kernel.org/all/[email protected]/#t [2]

Signed-off-by: Daniel Gomez <[email protected]>
---
Daniel Gomez (2):
      module: add -EEXIST documentation
      docs: hacking: clarify reserved -EEXIST in module_init()

 Documentation/kernel-hacking/hacking.rst | 7 +++++++
 kernel/module/main.c                     | 8 ++++++++
 2 files changed, 15 insertions(+)
---
base-commit: e5f0a698b34ed76002dc5cff3804a61c80233a7a
change-id: 20251218-dev-module-init-eexists-modules-docs-1dc7cb7a96bb
prerequisite-change-id: 20251013-module-warn-ret-59f085298055:v1
prerequisite-patch-id: c3e4f5b5d01c2b48b4c94e51a60469cb74691853
prerequisite-patch-id: 2d5a726a75f3b9d9c256b8478fb6115a92f04354

Best regards,
--  
Daniel Gomez <[email protected]>


Reply via email to