This is a note to let you know that I've just added the patch titled ecryptfs: fixed msync to flush data to the 3.9-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: ecryptfs-fixed-msync-to-flush-data.patch and it can be found in the queue-3.9 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From c15cddd900e867c5adfb3c79596479dc5975f743 Mon Sep 17 00:00:00 2001 From: Paul Taysom <taysom@xxxxxxxxxxxx> Date: Thu, 23 May 2013 14:31:43 -0700 Subject: ecryptfs: fixed msync to flush data From: Paul Taysom <taysom@xxxxxxxxxxxx> commit c15cddd900e867c5adfb3c79596479dc5975f743 upstream. When msync is called on a memory mapped file, that data is not flushed to the disk. In Linux, msync calls fsync for the file. For ecryptfs, fsync just calls the lower level file system's fsync. Changed the ecryptfs fsync code to call filemap_write_and_wait before calling the lower level fsync. Addresses the problem described in http://crbug.com/239536 Signed-off-by: Paul Taysom <taysom@xxxxxxxxxxxx> Signed-off-by: Tyler Hicks <tyhicks@xxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- fs/ecryptfs/file.c | 1 + 1 file changed, 1 insertion(+) --- a/fs/ecryptfs/file.c +++ b/fs/ecryptfs/file.c @@ -294,6 +294,7 @@ static int ecryptfs_release(struct inode static int ecryptfs_fsync(struct file *file, loff_t start, loff_t end, int datasync) { + filemap_write_and_wait(file->f_mapping); return vfs_fsync(ecryptfs_file_to_lower(file), datasync); } Patches currently in stable-queue which might be from taysom@xxxxxxxxxxxx are queue-3.9/ecryptfs-fixed-msync-to-flush-data.patch queue-3.9/ecryptfs-check-return-of-filemap_write_and_wait-during-fsync.patch -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html