diff --git a/[refs] b/[refs] index 790dee3785ba..c536b7caa77c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 32a8cf235e2f192eb002755076994525cdbaa35a +refs/heads/master: f4a2589feaef0a9b737a3e582b37ee96695bb25f diff --git a/trunk/kernel/cgroup.c b/trunk/kernel/cgroup.c index 3e6517e51fd3..5cf366965d0c 100644 --- a/trunk/kernel/cgroup.c +++ b/trunk/kernel/cgroup.c @@ -1922,6 +1922,8 @@ static int cgroup_release_agent_write(struct cgroup *cgrp, struct cftype *cft, const char *buffer) { BUILD_BUG_ON(sizeof(cgrp->root->release_agent_path) < PATH_MAX); + if (strlen(buffer) >= PATH_MAX) + return -EINVAL; if (!cgroup_lock_live_group(cgrp)) return -ENODEV; strcpy(cgrp->root->release_agent_path, buffer);