[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aU_52lcfC8NzmFp5@smile.fi.intel.com>
Date: Sat, 27 Dec 2025 17:23:06 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Daniel Gomez <da.gomez@...nel.org>
Cc: Daniel Scally <djrscally@...il.com>,
Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
Sakari Ailus <sakari.ailus@...ux.intel.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Danilo Krummrich <dakr@...nel.org>,
Luis Chamberlain <mcgrof@...nel.org>,
Petr Pavlu <petr.pavlu@...e.com>,
Sami Tolvanen <samitolvanen@...gle.com>,
Aaron Tomlin <atomlin@...mlin.com>,
Lucas De Marchi <demarchi@...nel.org>, linux-acpi@...r.kernel.org,
linux-modules@...r.kernel.org, linux-kernel@...r.kernel.org,
Daniel Gomez <da.gomez@...sung.com>
Subject: Re: [PATCH] software node: replace -EEXIST with -EBUSY
On Sat, Dec 20, 2025 at 04:55:00AM +0100, Daniel Gomez wrote:
> From: Daniel Gomez <da.gomez@...sung.com>
>
> The -EEXIST error code is reserved by the module loading infrastructure
> to indicate that a module is already loaded. When a module's init
> function returns -EEXIST, userspace tools like kmod interpret this as
> "module already loaded" and treat the operation as successful, returning
> 0 to the user even though the module initialization actually failed.
>
> This follows the precedent set by commit 54416fd76770 ("netfilter:
> conntrack: helper: Replace -EEXIST by -EBUSY") which fixed the same
> issue in nf_conntrack_helper_register().
>
> Affected modules:
> * meraki_mx100 pcengines_apuv2
As I read the description the problem is in the kmod/do_module_init(). If you
need a clear way to distinguish that, use some unique error code in the kernel
module loader. I fully agree with Greg that this is a slippery slope which
leads to -EEXIST to be forbidden in the drivers which is no go.
NAK.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists