Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 36476bea authored by Eric W. Biederman's avatar Eric W. Biederman
Browse files

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: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
parent 66d2f338
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;