]> git.karo-electronics.de Git - karo-tx-linux.git/commit
eCryptfs: Check for O_RDONLY lower inodes when opening lower files
authorTyler Hicks <tyhicks@linux.vnet.ibm.com>
Wed, 12 Aug 2009 06:06:54 +0000 (01:06 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 5 Oct 2009 16:31:40 +0000 (09:31 -0700)
commite6983f149c2f68f1e6344761d5f96a3f65a325f0
treece17663ca654089bf5ab7b698abfe31fbc0ebba3
parentd4127e16c4dde0ac06bc32a805d6807c0a36b598
eCryptfs: Check for O_RDONLY lower inodes when opening lower files

commit ac22ba23b659e34a5961aec8c945608e471b0d5b upstream.

If the lower inode is read-only, don't attempt to open the lower file
read/write and don't hand off the open request to the privileged
eCryptfs kthread for opening it read/write.  Instead, only try an
unprivileged, read-only open of the file and give up if that fails.
This patch fixes an oops when eCryptfs is mounted on top of a read-only
mount.

Acked-by: Serge Hallyn <serue@us.ibm.com>
Cc: Eric Sandeen <esandeen@redhat.com>
Cc: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
Cc: ecryptfs-devel@lists.launchpad.net
Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/ecryptfs/kthread.c
fs/ecryptfs/main.c