Commit 8a013ec9 authored by Thorsten Blum's avatar Thorsten Blum Committed by Tejun Heo
Browse files

cgroup: Replace deprecated strcpy() with strscpy()

strcpy() is deprecated; use strscpy() instead.

Link: https://github.com/KSPP/linux/issues/88


Signed-off-by: default avatarThorsten Blum <thorsten.blum@linux.dev>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent eea51c6e
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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);
	}