Petr Pavlu
2d079caf9c
module: Fix freeing of charp module parameters when CONFIG_SYSFS=n
...
[ Upstream commit deffe1edba ]
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 >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2026-05-23 13:04:21 +02:00
..
2025-06-27 11:11:19 +01:00
2026-02-11 13:40:16 +01:00
2026-04-02 13:09:25 +02:00
2025-12-18 13:54:45 +01:00
2026-05-23 13:04:20 +02:00
2025-11-02 22:15:22 +09:00
2026-01-30 10:28:48 +01:00
2026-03-25 11:08:35 +01:00
2025-12-07 06:24:56 +09:00
2026-03-04 07:19:39 -05:00
2026-03-25 11:08:26 +01:00
2026-05-14 15:29:28 +02:00
2026-03-04 07:20:22 -05:00
2026-04-11 14:24:34 +02:00
2026-03-13 17:20:44 +01:00
2026-01-23 11:18:40 +01:00
2026-04-22 13:18:50 +02:00
2026-01-08 10:15:04 +01:00
2026-04-02 13:09:39 +02:00
2026-03-04 07:20:05 -05:00
2026-04-02 13:09:30 +02:00
2025-08-20 18:30:58 +02:00
2025-06-19 15:31:38 +02:00
2025-12-01 11:43:21 +01:00
2025-09-04 15:31:47 +02:00
2026-03-04 07:19:22 -05:00
2026-03-04 07:19:22 -05:00
2026-01-08 10:15:05 +01:00
2026-03-04 07:19:26 -05:00
2025-11-02 22:15:22 +09:00
2025-11-02 22:15:22 +09:00
2025-12-18 13:55:19 +01:00
2025-12-18 13:55:21 +01:00
2025-11-13 15:33:57 -05:00
2025-09-09 18:58:01 +02:00
2025-10-15 12:00:04 +02:00
2025-10-15 12:00:03 +02:00
2026-02-11 13:40:18 +01:00
2025-06-19 15:32:33 +02:00
2025-08-28 16:31:06 +02:00
2026-03-04 07:20:07 -05:00
2025-11-13 15:34:06 -05:00
2026-03-25 11:08:41 +01:00
2026-03-04 07:20:27 -05:00
2026-03-04 07:21:54 -05:00
2025-09-19 16:35:45 +02:00
2025-08-28 16:31:10 +02:00
2025-06-04 14:43:52 +02:00
2025-12-18 13:54:57 +01:00
2026-03-04 07:20:54 -05:00
2025-09-11 17:21:46 +02:00
2025-10-19 16:34:02 +02:00
2026-05-17 17:14:34 +02:00
2025-12-18 13:55:17 +01:00
2026-05-07 06:09:47 +02:00
2025-09-04 15:31:45 +02:00
2026-05-14 15:29:28 +02:00
2026-05-23 13:04:21 +02:00
2026-01-23 11:18:36 +01:00
2025-05-29 11:03:25 +02:00
2026-03-25 11:08:53 +01:00
2025-07-10 16:05:08 +02:00
2025-11-13 15:34:14 -05:00
2026-05-14 15:29:28 +02:00
2025-11-13 15:33:55 -05:00
2025-12-18 13:55:00 +01:00
2025-08-15 12:13:49 +02:00
2025-08-15 12:13:31 +02:00
2026-01-08 10:13:54 +01:00
2026-05-14 15:29:21 +02:00
2026-03-04 07:19:36 -05:00
2026-03-04 07:21:59 -05:00
2026-05-07 06:09:26 +02:00
2026-01-08 10:14:34 +01:00
2026-01-23 11:18:52 +01:00
2025-09-09 18:58:04 +02:00
2025-05-29 11:03:22 +02:00
2026-01-08 10:15:03 +01:00
2026-03-25 11:08:45 +01:00
2026-05-07 06:09:47 +02:00
2026-04-27 07:24:24 -06:00
2026-03-04 07:19:40 -05:00
2025-08-20 18:30:14 +02:00
2025-12-18 13:55:07 +01:00
2026-01-11 15:25:21 +01:00
2026-03-25 11:08:53 +01:00
2025-12-18 13:55:14 +01:00
2025-08-20 18:30:37 +02:00
2026-03-13 17:20:27 +01:00
2026-03-13 17:20:42 +01:00
2026-03-04 07:21:16 -05:00
2026-01-23 11:18:50 +01:00
2026-03-04 07:19:38 -05:00
2026-04-11 14:24:27 +02:00
2025-05-29 11:03:25 +02:00
2026-03-13 17:20:21 +01:00
2025-08-15 12:14:05 +02:00
2025-08-28 16:31:12 +02:00
2025-08-28 16:31:05 +02:00
2026-03-25 11:08:25 +01:00
2025-08-01 09:48:42 +01:00
2026-01-08 10:14:16 +01:00
2026-02-06 16:55:46 +01:00
2025-08-28 16:31:09 +02:00
2026-03-13 17:20:27 +01:00
2026-01-23 11:18:40 +01:00
2025-10-19 16:34:01 +02:00
2026-04-22 13:19:02 +02:00
2026-03-13 17:20:23 +01:00
2026-03-13 17:20:24 +01:00
2026-03-13 17:20:24 +01:00
2025-11-24 10:35:59 +01:00
2025-07-17 18:37:24 +02:00
2025-06-19 15:31:54 +02:00
2025-08-20 18:30:16 +02:00
2025-09-25 11:13:51 +02:00
2026-05-14 15:29:17 +02:00
2026-05-14 15:29:17 +02:00
2025-05-29 11:03:23 +02:00
2026-05-14 15:29:17 +02:00
2026-03-04 07:20:02 -05:00
2026-05-23 13:04:21 +02:00
2026-03-25 11:08:28 +01:00
2026-04-11 14:24:32 +02:00
2025-08-28 16:31:04 +02:00
2025-11-24 10:36:06 +01:00
2025-12-18 13:55:18 +01:00
2026-01-23 11:18:36 +01:00
2025-08-28 16:31:05 +02:00
2025-12-18 13:55:18 +01:00
2026-01-08 10:14:09 +01:00
2026-01-23 11:18:51 +01:00
2025-06-19 15:32:18 +02:00
2025-10-15 12:00:03 +02:00
2025-06-19 15:32:37 +02:00
2025-08-20 18:30:35 +02:00
2026-05-07 06:09:25 +02:00
2025-05-29 11:03:22 +02:00
2026-03-04 07:21:06 -05:00
2026-03-13 17:20:18 +01:00
2025-06-19 15:32:11 +02:00
2026-05-23 13:04:20 +02:00
2025-12-18 13:54:49 +01:00
2025-09-19 16:35:42 +02:00
2025-09-19 16:35:42 +02:00
2026-02-11 13:40:25 +01:00
2026-04-02 13:09:25 +02:00
2025-06-19 15:32:22 +02:00
2025-10-23 16:20:39 +02:00
2025-06-19 15:31:42 +02:00
2026-01-30 10:28:36 +01:00
2025-08-15 12:13:35 +02:00
2026-05-14 15:29:29 +02:00
2025-08-15 12:13:53 +02:00
2025-08-15 12:13:42 +02:00
2025-07-17 18:37:08 +02:00
2026-03-04 07:20:20 -05:00
2026-05-07 06:09:35 +02:00
2025-12-18 13:55:04 +01:00
2025-12-18 13:54:44 +01:00
2026-01-08 10:14:11 +01:00
2026-03-13 17:20:35 +01:00
2025-10-19 16:33:34 +02:00
2025-08-20 18:30:49 +02:00
2026-05-15 14:51:08 +02:00
2026-03-25 11:08:57 +01:00
2026-02-11 13:40:25 +01:00
2025-11-13 15:34:18 -05:00
2026-03-04 07:20:11 -05:00
2026-03-04 07:19:35 -05:00
2026-05-23 13:04:21 +02:00
2025-07-10 16:04:54 +02:00
2025-08-01 09:48:43 +01:00
2026-03-25 11:08:45 +01:00
2025-10-02 13:44:11 +02:00
2026-04-11 14:24:52 +02:00
2025-06-27 11:11:30 +01:00
2026-01-23 11:18:40 +01:00
2025-11-13 15:34:02 -05:00
2026-05-07 06:09:34 +02:00
2026-01-17 16:31:29 +01:00
2026-03-04 07:21:59 -05:00
2026-03-25 11:08:44 +01:00
2026-01-08 10:15:01 +01:00
2026-03-04 07:20:09 -05:00
2026-04-22 13:19:02 +02:00
2026-03-25 11:08:44 +01:00
2026-05-07 06:09:23 +02:00
2026-01-08 10:15:05 +01:00
2025-12-18 13:55:10 +01:00
2026-01-30 10:28:49 +01:00
2025-09-09 18:58:15 +02:00
2025-08-15 12:14:04 +02:00
2026-05-23 13:04:20 +02:00
2026-03-13 17:20:26 +01:00