1
0
mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2026-01-12 09:32:12 +00:00
Petr Pavlu a6323bd4e6
module: Prevent silent truncation of module name in delete_module(2)
Passing a module name longer than MODULE_NAME_LEN to the delete_module
syscall results in its silent truncation. This really isn't much of
a problem in practice, but it could theoretically lead to the removal of an
incorrect module. It is more sensible to return ENAMETOOLONG or ENOENT in
such a case.

Update the syscall to return ENOENT, as documented in the delete_module(2)
man page to mean "No module by that name exists." This is appropriate
because a module with a name longer than MODULE_NAME_LEN cannot be loaded
in the first place.

Signed-off-by: Petr Pavlu <petr.pavlu@suse.com>
Reviewed-by: Daniel Gomez <da.gomez@samsung.com>
Link: https://lore.kernel.org/r/20250630143535.267745-2-petr.pavlu@suse.com
Signed-off-by: Daniel Gomez <da.gomez@samsung.com>
2025-07-31 13:57:21 +02:00
..
2025-07-30 09:58:50 -07:00
2025-07-30 09:58:50 -07:00
2025-07-30 17:14:01 -07:00
2025-07-11 16:02:01 +02:00
2025-07-30 08:58:55 -07:00
2025-07-29 21:43:08 -07:00
2025-07-30 19:26:49 -07:00
2025-07-30 11:01:41 -07:00
2025-07-30 17:14:01 -07:00
2025-07-30 16:41:58 -07:00
2025-03-30 15:44:36 -07:00
2025-07-11 17:55:16 +02:00
2025-07-30 16:23:12 -07:00
2025-07-30 09:58:50 -07:00
2025-07-30 16:23:12 -07:00
2025-07-29 21:43:08 -07:00
2025-07-29 16:14:07 -07:00