diff --git a/kernel/cgroup.c b/kernel/cgroup.c index 3070164e203663c89848840c6dda8029a3829e02..998ab5957c6a3775a23d833206072a86945effc8 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c @@ -1770,9 +1770,9 @@ int cgroup_path(const struct cgroup *cgrp, char *buf, int buflen) return 0; } - start = buf + buflen; + start = buf + buflen - 1; - *--start = '\0'; + *start = '\0'; for (;;) { int len = dentry->d_name.len;