History

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.

Al Viro committed 17 years ago

Commit 2a32ceb1 parent f9dbd057 files · +25 −13Browse files

Showing the changes to include/linux (1 of 7 files). Show all

Unified · Split

include/linux/fs.h+1−0
@@ -2368,6 +2368,7 @@ extern void file_update_time(struct file *file); · 2367 unmodified lines
23682368
23692369 extern int generic_show_options(struct seq_file *m, struct vfsmount *mnt);
23702370 extern void save_mount_options(struct super_block *sb, char *options);
2371+extern void replace_mount_options(struct super_block *sb, char *options);
23712372
23722373 static inline ino_t parent_ino(struct dentry *dentry)
23732374 {