projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
66d2f33
)
userns; Correct the comment in map_write
author
Eric W. Biederman
<ebiederm@xmission.com>
Sat, 6 Dec 2014 02:03:28 +0000
(20:03 -0600)
committer
Eric W. Biederman
<ebiederm@xmission.com>
Fri, 12 Dec 2014 00:07:06 +0000
(18:07 -0600)
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>
kernel/user_namespace.c
patch
|
blob
|
history
diff --git
a/kernel/user_namespace.c
b/kernel/user_namespace.c
index a2e37c5d2f63035d4cee00bb12a565f9bf8be774..ad419b04c1469c1be9731cb4cbaf4b7dd02238e1 100644
(file)
--- 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;