public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Daniel Gomez <da.gomez@kernel.org>
To: Luis Chamberlain <mcgrof@kernel.org>,
	Petr Pavlu <petr.pavlu@suse.com>,
	 Daniel Gomez <da.gomez@kernel.org>,
	Sami Tolvanen <samitolvanen@google.com>,
	 Aaron Tomlin <atomlin@atomlin.com>,
	Jonathan Corbet <corbet@lwn.net>,
	 Lucas De Marchi <demarchi@kernel.org>
Cc: linux-modules@vger.kernel.org, linux-kernel@vger.kernel.org,
	 linux-doc@vger.kernel.org, Daniel Gomez <da.gomez@samsung.com>
Subject: [PATCH 0/2] module: add -EEXIST module_init() reservation docs
Date: Thu, 18 Dec 2025 21:59:43 +0100	[thread overview]
Message-ID: <20251218-dev-module-init-eexists-modules-docs-v1-0-361569aa782a@samsung.com> (raw)

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/20251013-module-warn-ret-v1-0-ab65b41af01f@intel.com/ [1]
Link: https://lore.kernel.org/all/aKEVQhJpRdiZSliu@orbyte.nwl.cc/#t [2]

Signed-off-by: Daniel Gomez <da.gomez@samsung.com>
---
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 <da.gomez@samsung.com>


             reply	other threads:[~2025-12-18 21:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-18 20:59 Daniel Gomez [this message]
2025-12-18 20:59 ` [PATCH 1/2] module: add -EEXIST documentation Daniel Gomez
2025-12-18 20:59 ` [PATCH 2/2] docs: hacking: clarify reserved -EEXIST in module_init() Daniel Gomez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251218-dev-module-init-eexists-modules-docs-v1-0-361569aa782a@samsung.com \
    --to=da.gomez@kernel.org \
    --cc=atomlin@atomlin.com \
    --cc=corbet@lwn.net \
    --cc=da.gomez@samsung.com \
    --cc=demarchi@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-modules@vger.kernel.org \
    --cc=mcgrof@kernel.org \
    --cc=petr.pavlu@suse.com \
    --cc=samitolvanen@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox