]> 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)
committerTyler Hicks <tyhicks@linux.vnet.ibm.com>
Wed, 23 Sep 2009 14:10:32 +0000 (09:10 -0500)
commitac22ba23b659e34a5961aec8c945608e471b0d5b
tree6629c15380fe2db238fa078e912f4cf393708161
parentb0105eaefa7cce8f4a941d0fc6354b250d30e745
eCryptfs: Check for O_RDONLY lower inodes when opening lower files

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
Cc: stable <stable@kernel.org>
Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
fs/ecryptfs/kthread.c
fs/ecryptfs/main.c