diff options
| author | Thorsten Blum <thorsten.blum@linux.dev> | 2025-08-12 13:50:35 +0200 |
|---|---|---|
| committer | Tejun Heo <tj@kernel.org> | 2025-08-12 08:57:03 -1000 |
| commit | 8a013ec9cb7af9921656c0e78c73510c9e4a0cc1 (patch) | |
| tree | 72b99e4778f6291bb98d106ad7fc20e5ec6be579 /kernel | |
| parent | cgroup: avoid null de-ref in css_rstat_exit() (diff) | |
| download | linux-8a013ec9cb7af9921656c0e78c73510c9e4a0cc1.tar.gz linux-8a013ec9cb7af9921656c0e78c73510c9e4a0cc1.zip | |
cgroup: Replace deprecated strcpy() with strscpy()
strcpy() is deprecated; use strscpy() instead.
Link: https://github.com/KSPP/linux/issues/88
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/cgroup/cgroup-v1.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/cgroup/cgroup-v1.c b/kernel/cgroup/cgroup-v1.c index 2a4a387f867a..763343fbd5a1 100644 --- a/kernel/cgroup/cgroup-v1.c +++ b/kernel/cgroup/cgroup-v1.c @@ -10,6 +10,7 @@ #include <linux/sched/task.h> #include <linux/magic.h> #include <linux/slab.h> +#include <linux/string.h> #include <linux/vmalloc.h> #include <linux/delayacct.h> #include <linux/pid_namespace.h> @@ -1133,7 +1134,7 @@ int cgroup1_reconfigure(struct fs_context *fc) if (ctx->release_agent) { spin_lock(&release_agent_path_lock); - strcpy(root->release_agent_path, ctx->release_agent); + strscpy(root->release_agent_path, ctx->release_agent); spin_unlock(&release_agent_path_lock); } |
