Commit:     2aeb3db17fc33443d21b11d7121c5627d55717c6
Parent:     85787a2bea516b76a013eea7f5f3fad12c5a6417
Author:     Ryusuke Konishi <[EMAIL PROTECTED]>
AuthorDate: Thu Aug 30 23:56:33 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Fri Aug 31 01:42:23 2007 -0700

    eCryptfs: fix possible fault in ecryptfs_sync_page
    This will avoid a possible fault in ecryptfs_sync_page().
    In the function, eCryptfs calls sync_page() method of a lower filesystem
    without checking its existence.  However, there are many filesystems that
    don't have this method including network filesystems such as NFS, AFS, and
    so forth.  They may fail when an eCryptfs page is waiting for lock.
    Signed-off-by: Ryusuke Konishi <[EMAIL PROTECTED]>
    Acked-by: Michael Halcrow <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
 fs/ecryptfs/mmap.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/fs/ecryptfs/mmap.c b/fs/ecryptfs/mmap.c
index e4ab7bc..fd3f94d 100644
--- a/fs/ecryptfs/mmap.c
+++ b/fs/ecryptfs/mmap.c
@@ -834,7 +834,8 @@ static void ecryptfs_sync_page(struct page *page)
                ecryptfs_printk(KERN_DEBUG, "find_lock_page failed\n");
-       lower_page->mapping->a_ops->sync_page(lower_page);
+       if (lower_page->mapping->a_ops->sync_page)
+               lower_page->mapping->a_ops->sync_page(lower_page);
        ecryptfs_printk(KERN_DEBUG, "Unlocking page with index = [0x%.16x]\n",
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to