summaryrefslogtreecommitdiffstats
path: root/kernel/user_namespace.c
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2014-12-06 03:03:28 +0100
committerEric W. Biederman <ebiederm@xmission.com>2014-12-12 01:07:06 +0100
commit36476beac4f8ca9dc7722790b2e8ef0e8e51034e (patch)
tree26eb0855cf23ff3978821e2e5ab42d6df7902ccb /kernel/user_namespace.c
parentuserns: Allow setting gid_maps without privilege when setgroups is disabled (diff)
downloadlinux-36476beac4f8ca9dc7722790b2e8ef0e8e51034e.tar.xz
linux-36476beac4f8ca9dc7722790b2e8ef0e8e51034e.zip
userns; Correct the comment in map_write
It is important that all maps are less than PAGE_SIZE or else setting the last byte of the buffer to '0' could write off the end of the allocated storage. Correct the misleading comment. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'kernel/user_namespace.c')
-rw-r--r--kernel/user_namespace.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/user_namespace.c b/kernel/user_namespace.c
index a2e37c5d2f63..ad419b04c146 100644
--- a/kernel/user_namespace.c
+++ b/kernel/user_namespace.c
@@ -643,7 +643,7 @@ static ssize_t map_write(struct file *file, const char __user *buf,
if (!page)
goto out;
- /* Only allow <= page size writes at the beginning of the file */
+ /* Only allow < page size writes at the beginning of the file */
ret = -EINVAL;
if ((*ppos != 0) || (count >= PAGE_SIZE))
goto out;