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>
Showing
- drivers/isdn/capi/capifs.c 1 addition, 2 deletionsdrivers/isdn/capi/capifs.c
- fs/affs/super.c 1 addition, 2 deletionsfs/affs/super.c
- fs/afs/super.c 2 additions, 2 deletionsfs/afs/super.c
- fs/hpfs/super.c 1 addition, 2 deletionsfs/hpfs/super.c
- fs/namespace.c 18 additions, 3 deletionsfs/namespace.c
- fs/reiserfs/super.c 1 addition, 2 deletionsfs/reiserfs/super.c
- include/linux/fs.h 1 addition, 0 deletionsinclude/linux/fs.h
Loading
Please register or sign in to comment