[PATCH v2 0/3] module: Fix freeing of charp module parameters when CONFIG_SYSFS=n

Petr Pavlu posted 3 patches 3 weeks, 3 days ago
include/linux/moduleparam.h | 100 +++++++++++++++++-------------------
kernel/module/main.c        |   4 +-
kernel/params.c             |  29 +++++++----
3 files changed, 68 insertions(+), 65 deletions(-)
[PATCH v2 0/3] module: Fix freeing of charp module parameters when CONFIG_SYSFS=n
Posted by Petr Pavlu 3 weeks, 3 days ago
Fix freeing of charp module parameters when CONFIG_SYSFS=n and, related to
this, update moduleparam.h to keep its coding style consistent.

Changes since v1 [1]:
* Remove the extern keyword from the declaration of module_destroy_params()
  and update the type of its num parameter from `unsigned` to
  `unsigned int`.
* Add a cleanup patch for parse_args() to similarly update its num
  parameter to `unsigned int` and to synchronize the parameter names
  between its prototype and definition.
* Add a cleanup patch to drop the unnecessary extern keyword for all
  function declarations in moduleparam.h.

[1] https://lore.kernel.org/linux-modules/20260306125457.1377402-1-petr.pavlu@suse.com/

Petr Pavlu (3):
  module: Fix freeing of charp module parameters when CONFIG_SYSFS=n
  module: Clean up parse_args() arguments
  module: Remove extern keyword from param prototypes

 include/linux/moduleparam.h | 100 +++++++++++++++++-------------------
 kernel/module/main.c        |   4 +-
 kernel/params.c             |  29 +++++++----
 3 files changed, 68 insertions(+), 65 deletions(-)


base-commit: 0257f64bdac7fdca30fa3cae0df8b9ecbec7733a
-- 
2.53.0
Re: [PATCH v2 0/3] module: Fix freeing of charp module parameters when CONFIG_SYSFS=n
Posted by Sami Tolvanen 2 weeks, 3 days ago
On Fri, 13 Mar 2026 14:48:01 +0100, Petr Pavlu wrote:
> Fix freeing of charp module parameters when CONFIG_SYSFS=n and, related to
> this, update moduleparam.h to keep its coding style consistent.
> 
> Changes since v1 [1]:
> * Remove the extern keyword from the declaration of module_destroy_params()
>   and update the type of its num parameter from `unsigned` to
>   `unsigned int`.
> * Add a cleanup patch for parse_args() to similarly update its num
>   parameter to `unsigned int` and to synchronize the parameter names
>   between its prototype and definition.
> * Add a cleanup patch to drop the unnecessary extern keyword for all
>   function declarations in moduleparam.h.
> 
> [...]

Applied to modules-next, thanks!

[1/3] module: Fix freeing of charp module parameters when CONFIG_SYSFS=n
      commit: deffe1edba626d474fef38007c03646ca5876a0e
[2/3] module: Clean up parse_args() arguments
      commit: 65f535501e2a3378629b8650eca553920de5e5a2
[3/3] module: Remove extern keyword from param prototypes
      commit: 44a063c00fb13cf1f2e8a53a2ab10b232a44954b

Best regards,

	Sami