Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+1 -1
+1 -1
kernel/user_namespace.c
··· 643 643 if (!page) 644 644 goto out; 645 645 646 - /* Only allow <= page size writes at the beginning of the file */ 646 + /* Only allow < page size writes at the beginning of the file */ 647 647 ret = -EINVAL; 648 648 if ((*ppos != 0) || (count >= PAGE_SIZE)) 649 649 goto out;