mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 00:22:00 +02:00
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>
This commit is contained in:
parent
eea51c6e3f
commit
8a013ec9cb
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user