diff options
author | Aaron Tomlin <atomlin@redhat.com> | 2022-07-14 18:39:32 +0300 |
---|---|---|
committer | Luis Chamberlain <mcgrof@kernel.org> | 2022-07-15 03:40:23 +0300 |
commit | dbf0ae65bce48bf4c2b6d114cac10193ef050294 (patch) | |
tree | b83f04ac960fc0b0b53808398339288d1ac1b934 /kernel/module/main.c | |
parent | 17dd25c29cda98c370f8d5a4ae3daee33fac1669 (diff) | |
download | linux-dbf0ae65bce48bf4c2b6d114cac10193ef050294.tar.xz |
module: Use strscpy() for last_unloaded_module
The use of strlcpy() is considered deprecated [1].
In this particular context, there is no need to remain with strlcpy().
Therefore we transition to strscpy().
[1]: https://www.kernel.org/doc/html/latest/process/deprecated.html#strlcpy
Signed-off-by: Aaron Tomlin <atomlin@redhat.com>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Diffstat (limited to 'kernel/module/main.c')
-rw-r--r-- | kernel/module/main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/module/main.c b/kernel/module/main.c index b6e3dfd2068c..a776fdaf021d 100644 --- a/kernel/module/main.c +++ b/kernel/module/main.c @@ -754,7 +754,7 @@ SYSCALL_DEFINE2(delete_module, const char __user *, name_user, async_synchronize_full(); /* Store the name of the last unloaded module for diagnostic purposes */ - strlcpy(last_unloaded_module, mod->name, sizeof(last_unloaded_module)); + strscpy(last_unloaded_module, mod->name, sizeof(last_unloaded_module)); free_module(mod); /* someone could wait for the module in add_unformed_module() */ |