diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2009-05-08 16:05:57 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2009-05-09 10:51:34 -0400 |
commit | 2a32cebd6cbcc43996c3e2d114fa32ba1e71192a (patch) | |
tree | 0ad94849a7bc3e97cd19978005d1898c8bb44b36 /drivers/isdn | |
parent | f9dbd05bc97d1d4f17c2057612f6a8e4dbd039e0 (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 'drivers/isdn')
-rw-r--r-- | drivers/isdn/capi/capifs.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/isdn/capi/capifs.c b/drivers/isdn/capi/capifs.c index b129409925af..8f9f3b5a3e8c 100644 --- a/drivers/isdn/capi/capifs.c +++ b/drivers/isdn/capi/capifs.c | |||
@@ -75,8 +75,7 @@ static int capifs_remount(struct super_block *s, int *flags, char *data) | |||
75 | } | 75 | } |
76 | } | 76 | } |
77 | 77 | ||
78 | kfree(s->s_options); | 78 | replace_mount_options(s, new_opt); |
79 | s->s_options = new_opt; | ||
80 | 79 | ||
81 | config.setuid = setuid; | 80 | config.setuid = setuid; |
82 | config.setgid = setgid; | 81 | config.setgid = setgid; |