aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2009-05-08 16:05:57 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2009-05-09 10:51:34 -0400
commit2a32cebd6cbcc43996c3e2d114fa32ba1e71192a (patch)
tree0ad94849a7bc3e97cd19978005d1898c8bb44b36 /include/linux
parentf9dbd05bc97d1d4f17c2057612f6a8e4dbd039e0 (diff)
Fix races around the access to ->s_options
Put generic_show_options read access to s_options under rcu_read_lock, split save_mount_options() into "we are setting it the first time" (uses in foo_fill_super()) and "we are relacing and freeing the old one", synchronize_rcu() before kfree() in the latter. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/fs.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index ed788426f464..3b534e527e09 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -2368,6 +2368,7 @@ extern void file_update_time(struct file *file);
2368 2368
2369extern int generic_show_options(struct seq_file *m, struct vfsmount *mnt); 2369extern int generic_show_options(struct seq_file *m, struct vfsmount *mnt);
2370extern void save_mount_options(struct super_block *sb, char *options); 2370extern void save_mount_options(struct super_block *sb, char *options);
2371extern void replace_mount_options(struct super_block *sb, char *options);
2371 2372
2372static inline ino_t parent_ino(struct dentry *dentry) 2373static inline ino_t parent_ino(struct dentry *dentry)
2373{ 2374{