aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ecryptfs/ecryptfs_kernel.h
diff options
context:
space:
mode:
authorTyler Hicks <tyhicks@linux.vnet.ibm.com>2011-05-24 04:49:02 -0400
committerTyler Hicks <tyhicks@linux.vnet.ibm.com>2011-05-29 15:23:39 -0400
commit3b06b3ebf44170c90c893c6c80916db6e922b9f2 (patch)
tree1da70b311ad7ec7615f3d44ae269ca56a458fc2d /fs/ecryptfs/ecryptfs_kernel.h
parent5ccf92037c7c6e6f28175fd245284923f939259f (diff)
eCryptfs: Fix new inode race condition
Only unlock and d_add() new inodes after the plaintext inode size has been read from the lower filesystem. This fixes a race condition that was sometimes seen during a multi-job kernel build in an eCryptfs mount. https://bugzilla.kernel.org/show_bug.cgi?id=36002 Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com> Reported-by: David <david@unsolicited.net> Tested-by: David <david@unsolicited.net>
Diffstat (limited to 'fs/ecryptfs/ecryptfs_kernel.h')
-rw-r--r--fs/ecryptfs/ecryptfs_kernel.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ecryptfs/ecryptfs_kernel.h b/fs/ecryptfs/ecryptfs_kernel.h
index 41a453236371..72aa24a4c71e 100644
--- a/fs/ecryptfs/ecryptfs_kernel.h
+++ b/fs/ecryptfs/ecryptfs_kernel.h
@@ -662,7 +662,7 @@ void ecryptfs_write_crypt_stat_flags(char *page_virt,
662int ecryptfs_read_and_validate_header_region(char *data, 662int ecryptfs_read_and_validate_header_region(char *data,
663 struct inode *ecryptfs_inode); 663 struct inode *ecryptfs_inode);
664int ecryptfs_read_and_validate_xattr_region(char *page_virt, 664int ecryptfs_read_and_validate_xattr_region(char *page_virt,
665 struct dentry *ecryptfs_dentry); 665 struct inode *inode);
666u8 ecryptfs_code_for_cipher_string(char *cipher_name, size_t key_bytes); 666u8 ecryptfs_code_for_cipher_string(char *cipher_name, size_t key_bytes);
667int ecryptfs_cipher_code_to_string(char *str, u8 cipher_code); 667int ecryptfs_cipher_code_to_string(char *str, u8 cipher_code);
668void ecryptfs_set_default_sizes(struct ecryptfs_crypt_stat *crypt_stat); 668void ecryptfs_set_default_sizes(struct ecryptfs_crypt_stat *crypt_stat);
@@ -753,7 +753,7 @@ int ecryptfs_privileged_open(struct file **lower_file,
753 struct dentry *lower_dentry, 753 struct dentry *lower_dentry,
754 struct vfsmount *lower_mnt, 754 struct vfsmount *lower_mnt,
755 const struct cred *cred); 755 const struct cred *cred);
756int ecryptfs_get_lower_file(struct dentry *ecryptfs_dentry); 756int ecryptfs_get_lower_file(struct dentry *dentry, struct inode *inode);
757void ecryptfs_put_lower_file(struct inode *inode); 757void ecryptfs_put_lower_file(struct inode *inode);
758int 758int
759ecryptfs_write_tag_70_packet(char *dest, size_t *remaining_bytes, 759ecryptfs_write_tag_70_packet(char *dest, size_t *remaining_bytes,