mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 11:46:19 +00:00
ecryptfs: add missing lock around notify_change
Callers of notify_change() need to hold i_mutex. Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Cc: Michael Halcrow <mhalcrow@us.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
18d1dbf1d4
commit
9c3580aa52
1 changed files with 2 additions and 0 deletions
|
@ -908,7 +908,9 @@ static int ecryptfs_setattr(struct dentry *dentry, struct iattr *ia)
|
|||
if (ia->ia_valid & (ATTR_KILL_SUID | ATTR_KILL_SGID))
|
||||
ia->ia_valid &= ~ATTR_MODE;
|
||||
|
||||
mutex_lock(&lower_dentry->d_inode->i_mutex);
|
||||
rc = notify_change(lower_dentry, ia);
|
||||
mutex_unlock(&lower_dentry->d_inode->i_mutex);
|
||||
out:
|
||||
fsstack_copy_attr_all(inode, lower_inode, NULL);
|
||||
return rc;
|
||||
|
|
Loading…
Reference in a new issue