aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/cgroup.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index 3070164e2036..998ab5957c6a 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -1770,9 +1770,9 @@ int cgroup_path(const struct cgroup *cgrp, char *buf, int buflen)
1770 return 0; 1770 return 0;
1771 } 1771 }
1772 1772
1773 start = buf + buflen; 1773 start = buf + buflen - 1;
1774 1774
1775 *--start = '\0'; 1775 *start = '\0';
1776 for (;;) { 1776 for (;;) {
1777 int len = dentry->d_name.len; 1777 int len = dentry->d_name.len;
1778 1778