[PATCH] ext4: crypto return correct error for file_mmap when get_encryption_info failed.

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

 



diff --git a/fs/ext4/file.c b/fs/ext4/file.c
index 113837e..1c0086a 100644
--- a/fs/ext4/file.c
+++ b/fs/ext4/file.c
@@ -295,7 +295,7 @@ static int ext4_file_mmap(struct file *file,
struct vm_area_struct *vma)
        if (ext4_encrypted_inode(inode)) {
                int err = ext4_get_encryption_info(inode);
                if (err)
-                       return 0;
+                       return -EACCES;
                if (ext4_encryption_info(inode) == NULL)
                        return -ENOKEY;
        }
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux