diff options
author | Takashi Iwai <tiwai@suse.de> | 2010-08-18 09:17:52 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-08-18 09:17:52 -0400 |
commit | e7cfbea9cb7a02ea29fdae5d39c9e3d09102c4d5 (patch) | |
tree | 37c20ec03e70dc7b5df1d02f16b6ac38d8ed1364 /kernel/cgroup.c | |
parent | 7ac03db84baa204d7d280401ed65842541ed1078 (diff) | |
parent | 56385a12d9bb9e173751f74b6c430742018cafc0 (diff) |
Merge branch 'fix/misc' into topic/misc
Diffstat (limited to 'kernel/cgroup.c')
-rw-r--r-- | kernel/cgroup.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c index d83cab06da87..192f88c5b0f9 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c | |||
@@ -1102,7 +1102,7 @@ static int parse_cgroupfs_options(char *data, struct cgroup_sb_opts *opts) | |||
1102 | if (opts->release_agent) | 1102 | if (opts->release_agent) |
1103 | return -EINVAL; | 1103 | return -EINVAL; |
1104 | opts->release_agent = | 1104 | opts->release_agent = |
1105 | kstrndup(token + 14, PATH_MAX, GFP_KERNEL); | 1105 | kstrndup(token + 14, PATH_MAX - 1, GFP_KERNEL); |
1106 | if (!opts->release_agent) | 1106 | if (!opts->release_agent) |
1107 | return -ENOMEM; | 1107 | return -ENOMEM; |
1108 | } else if (!strncmp(token, "name=", 5)) { | 1108 | } else if (!strncmp(token, "name=", 5)) { |
@@ -1123,7 +1123,7 @@ static int parse_cgroupfs_options(char *data, struct cgroup_sb_opts *opts) | |||
1123 | if (opts->name) | 1123 | if (opts->name) |
1124 | return -EINVAL; | 1124 | return -EINVAL; |
1125 | opts->name = kstrndup(name, | 1125 | opts->name = kstrndup(name, |
1126 | MAX_CGROUP_ROOT_NAMELEN, | 1126 | MAX_CGROUP_ROOT_NAMELEN - 1, |
1127 | GFP_KERNEL); | 1127 | GFP_KERNEL); |
1128 | if (!opts->name) | 1128 | if (!opts->name) |
1129 | return -ENOMEM; | 1129 | return -ENOMEM; |