OSDN Git Service

cgroup: avoid copying strings longer than the buffers
authorMa Shimiao <mashimiao.fnst@cn.fujitsu.com>
Tue, 12 Dec 2017 01:43:49 +0000 (09:43 +0800)
committerTejun Heo <tj@kernel.org>
Tue, 12 Dec 2017 15:53:29 +0000 (07:53 -0800)
commite7fd37ba12170cc414be8b639dfc2c5f7172fac2
treec8e28735d16cf75f102f08bc9500f5b128a42bc2
parentc2f31b79d510ec1a27138bdcf2d0ece1080be85e
cgroup: avoid copying strings longer than the buffers

cgroup root name and file name have max length limit, we should
avoid copying longer name than that to the name.

tj: minor update to $SUBJ.

Signed-off-by: Ma Shimiao <mashimiao.fnst@cn.fujitsu.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/cgroup/cgroup.c