Petr Pavlu
deffe1edba
module: Fix freeing of charp module parameters when CONFIG_SYSFS=n
...
When setting a charp module parameter, the param_set_charp() function
allocates memory to store a copy of the input value. Later, when the module
is potentially unloaded, the destroy_params() function is called to free
this allocated memory.
However, destroy_params() is available only when CONFIG_SYSFS=y, otherwise
only a dummy variant is present. In the unlikely case that the kernel is
configured with CONFIG_MODULES=y and CONFIG_SYSFS=n, this results in
a memory leak of charp values when a module is unloaded.
Fix this issue by making destroy_params() always available when
CONFIG_MODULES=y. Rename the function to module_destroy_params() to clarify
that it is intended for use by the module loader.
Fixes: e180a6b775 ("param: fix charp parameters set via sysfs")
Signed-off-by: Petr Pavlu <petr.pavlu@suse.com >
Signed-off-by: Sami Tolvanen <samitolvanen@google.com >
2026-03-18 21:43:18 +00:00
..
2026-02-11 13:44:47 +01:00
2026-03-03 13:12:42 +01:00
2026-03-10 11:32:31 -05:00
2026-02-19 07:26:26 -07:00
2026-02-17 11:00:43 +01:00
2026-02-16 11:05:44 -08:00
2026-02-19 09:30:05 -08:00
2026-02-23 13:45:50 +01:00
2026-02-17 15:04:20 +01:00
2026-02-27 13:11:56 +02:00
2026-02-10 19:01:45 -08:00
2026-02-17 11:40:04 -08:00
2026-02-21 01:02:28 -08:00
2026-02-12 17:49:33 -08:00
2026-03-14 09:43:12 -07:00
2026-02-21 17:09:51 -08:00
2026-02-11 19:31:52 -08:00
2026-02-16 10:21:01 -07:00
2026-02-12 04:23:53 -07:00
2026-02-27 15:39:00 -08:00
2026-02-27 15:39:00 -08:00
2026-02-27 15:39:00 -08:00
2026-02-14 07:43:27 -07:00
2026-02-11 13:20:50 -08:00
2026-02-15 08:18:57 -08:00
2026-02-12 11:32:37 -08:00
2026-02-21 01:01:14 -08:00
2026-02-10 17:02:23 -08:00
2026-02-14 11:09:47 +01:00
2026-02-18 20:50:32 -08:00
2026-02-21 17:09:51 -08:00
2026-02-12 15:42:58 -08:00
2026-02-12 15:52:39 -08:00
2026-02-21 17:09:51 -08:00
2026-02-13 14:51:39 -08:00
2026-03-07 15:03:14 -08:00
2026-02-14 11:09:47 +01:00
2026-02-12 12:13:01 -08:00
2026-02-18 10:45:36 -08:00
2026-02-19 09:12:05 +01:00
2026-02-17 23:11:40 -08:00
2026-02-19 15:21:22 -05:00
2026-02-21 17:09:51 -08:00
2026-02-26 17:30:32 +01:00
2026-02-26 15:27:41 -08:00
2026-02-19 18:57:38 +01:00
2026-02-10 16:41:59 -08:00
2026-02-12 15:42:57 -08:00
2026-02-18 20:50:32 -08:00
2026-03-03 12:41:29 +01:00
2026-02-11 21:03:39 +01:00
2026-02-10 13:39:37 -08:00
2026-03-11 14:35:16 -06:00
2026-02-21 17:09:51 -08:00
2026-02-12 16:33:05 -08:00
2026-03-11 17:53:37 -07:00
2026-02-10 16:30:29 -08:00
2026-02-11 08:55:52 +01:00
2026-02-26 10:45:49 +01:00
2026-03-11 18:01:55 +01:00
2026-02-12 17:12:43 -08:00
2026-02-14 11:09:46 +01:00
2026-02-24 11:13:26 -08:00
2026-02-11 11:27:58 +01:00
2026-02-18 20:50:32 -08:00
2026-02-12 15:42:53 -08:00
2026-03-02 11:51:51 -05:00
2026-02-12 15:42:59 -08:00
2026-03-04 09:44:22 -08:00
2026-03-04 09:44:24 -08:00
2026-02-12 12:13:01 -08:00
2026-03-18 21:43:18 +00:00
2026-02-10 16:30:29 -08:00
2026-03-10 13:30:30 +01:00
2026-02-27 22:00:08 +01:00
2026-02-20 17:31:55 -05:00
2026-03-10 08:20:29 -07:00
2026-02-24 15:46:31 -08:00
2026-02-11 19:31:52 -08:00
2026-02-12 16:33:05 -08:00
2026-02-11 12:45:40 -05:00
2026-02-12 15:43:00 -08:00
2026-02-10 11:39:30 +01:00
2026-02-10 11:39:31 +01:00
2026-02-10 11:39:30 +01:00
2026-02-23 14:08:17 +01:00
2026-02-16 13:41:38 -08:00
2026-03-03 22:25:32 -05:00
2026-02-23 11:19:19 +01:00
2026-03-11 12:01:07 +01:00
2026-02-23 11:19:19 +01:00
2026-03-11 12:01:06 +01:00
2026-02-12 15:42:58 -08:00
2026-02-21 01:02:52 -08:00
2026-02-26 17:30:32 +01:00
2026-02-11 10:14:35 +01:00
2026-02-10 17:02:23 -08:00
2026-02-27 16:11:50 -08:00
2026-02-19 15:25:11 -05:00
2026-02-12 15:43:02 -08:00
2026-02-15 10:20:37 -08:00
2026-02-12 12:13:01 -08:00
2026-03-10 12:47:56 -07:00
2026-02-17 09:11:04 -08:00
2026-03-11 16:16:56 +01:00
2026-02-12 11:32:37 -08:00
2026-02-12 12:13:01 -08:00