mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-11-07 04:09:21 +00:00
do_dentry_open(): close the race with mark_files_ro() in failure exit
we want to take it out of mark_files_ro() reach *before* we start checking if we ought to drop write access. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
85d7d618c1
commit
c3c4f69424
1 changed files with 1 additions and 1 deletions
|
@ -727,6 +727,7 @@ static int do_dentry_open(struct file *f,
|
|||
|
||||
cleanup_all:
|
||||
fops_put(f->f_op);
|
||||
file_sb_list_del(f);
|
||||
if (f->f_mode & FMODE_WRITE) {
|
||||
put_write_access(inode);
|
||||
if (!special_file(inode->i_mode)) {
|
||||
|
@ -740,7 +741,6 @@ cleanup_all:
|
|||
mnt_drop_write(f->f_path.mnt);
|
||||
}
|
||||
}
|
||||
file_sb_list_del(f);
|
||||
cleanup_file:
|
||||
path_put(&f->f_path);
|
||||
f->f_path.mnt = NULL;
|
||||
|
|
Loading…
Reference in a new issue