projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
85d7d61
)
do_dentry_open(): close the race with mark_files_ro() in failure exit
author
Al Viro
<viro@zeniv.linux.org.uk>
Sat, 23 Jun 2012 18:49:45 +0000
(22:49 +0400)
committer
Al Viro
<viro@zeniv.linux.org.uk>
Sat, 14 Jul 2012 12:35:50 +0000
(16:35 +0400)
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>
fs/open.c
patch
|
blob
|
history
diff --git
a/fs/open.c
b/fs/open.c
index 124ccb1d38a032b66f312d3e0ffdbb336c7db16f..764cc9c201a58f8fd75d1f90d98269c368b1d475 100644
(file)
--- a/
fs/open.c
+++ b/
fs/open.c
@@
-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;