+ ecryptfs-zero-out-last-page-for-llseek-write.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     zero out last page for llseek/write
has been added to the -mm tree.  Its filename is
     ecryptfs-zero-out-last-page-for-llseek-write.patch

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: zero out last page for llseek/write
From: Michael Halcrow <mhalcrow@xxxxxxxxxx>

When one llseek's past the end of the file and then writes, every page past
the previous end of the file should be cleared.  Trevor found that the code,
as is, does not assure that the very last page is always cleared.  This patch
takes care of that.

Signed-off-by: Michael Halcrow <mhalcrow@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 fs/ecryptfs/mmap.c |    2 ++
 1 files changed, 2 insertions(+)

diff -puN fs/ecryptfs/mmap.c~ecryptfs-zero-out-last-page-for-llseek-write fs/ecryptfs/mmap.c
--- a/fs/ecryptfs/mmap.c~ecryptfs-zero-out-last-page-for-llseek-write
+++ a/fs/ecryptfs/mmap.c
@@ -422,6 +422,8 @@ static int ecryptfs_prepare_write(struct
 				goto out;
 			}
 		}
+		if (end_of_prev_pg_pos + 1 > i_size_read(page->mapping->host))
+			zero_user_page(page, 0, PAGE_CACHE_SIZE, KM_USER0);
 	}
 out:
 	return rc;
_

Patches currently in -mm which might be from mhalcrow@xxxxxxxxxx are

ecryptfs-fix-write-zeros-behavior.patch
ecryptfs-initialize-crypt_stat-in-setattr.patch
ecryptfs-zero-out-last-page-for-llseek-write.patch
git-unionfs.patch
couple-fixes-to-fs-ecryptfs-inodec.patch
ecryptfs-move-ecryptfs-docs-into-documentation-filesystems.patch
fs-introduce-vfs_path_lookup.patch
sunrpc-use-vfs_path_lookup.patch
nfsctl-use-vfs_path_lookup.patch
fs-mark-link_path_walk-static.patch
fs-remove-path_walk-export.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux