Linux Modules
 help / color / mirror / Atom feed
* [PATCH 0/2] module: Remove unnecessary module::args
@ 2026-06-04 11:04 Petr Pavlu
  2026-06-04 11:04 ` [PATCH 1/2] xtensa/simdisk: Avoid referring to module::args Petr Pavlu
  2026-06-04 11:04 ` [PATCH 2/2] module: Remove unnecessary module::args Petr Pavlu
  0 siblings, 2 replies; 5+ messages in thread
From: Petr Pavlu @ 2026-06-04 11:04 UTC (permalink / raw)
  To: Chris Zankel, Max Filippov, Luis Chamberlain, Petr Pavlu,
	Daniel Gomez, Sami Tolvanen
  Cc: Aaron Tomlin, Matthew Wood, linux-modules, linux-kernel

Historically, various parameter-handling code kept pointers into
module::args, most notably the charp support. However, in 2009,
commit e180a6b7759a ("param: fix charp parameters set via sysfs") changed
charp parameters to kstrdup() the input string as well. As a result,
module::args now mostly wastes memory.

Reviewing all kernel_param_ops and module_param_call instances shows that
the last code still relying on module::args remaining valid for the
module's lifetime is simdisk_param_ops_filename. Update it to use kstrdup()
and then remove module::args.

Petr Pavlu (2):
  xtensa/simdisk: Avoid referring to module::args
  module: Remove unnecessary module::args

 arch/xtensa/platforms/iss/simdisk.c | 38 +++++++++++++++++++++++++----
 include/linux/module.h              |  4 ---
 kernel/module/main.c                | 15 ++++++------
 3 files changed, 41 insertions(+), 16 deletions(-)


base-commit: e43ffb69e0438cddd72aaa30898b4dc446f664f8
-- 
2.54.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-06-04 13:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-04 11:04 [PATCH 0/2] module: Remove unnecessary module::args Petr Pavlu
2026-06-04 11:04 ` [PATCH 1/2] xtensa/simdisk: Avoid referring to module::args Petr Pavlu
2026-06-04 11:18   ` sashiko-bot
2026-06-04 11:04 ` [PATCH 2/2] module: Remove unnecessary module::args Petr Pavlu
2026-06-04 13:25   ` Aaron Tomlin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox