diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-08-24 05:03:05 (GMT) |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-09-23 03:24:54 (GMT) |
commit | 5dd3177ae5012c1e2ad7a9ffdbd0e0d0de2f60e4 (patch) | |
tree | 2a8730d6443f6d33e8879cfc323396f9a570b97b /fs/nfs/super.c | |
parent | 275a082fe9308e710324e26ccb5363c53d8fd45f (diff) | |
download | linux-5dd3177ae5012c1e2ad7a9ffdbd0e0d0de2f60e4.tar.xz |
NFSv4: Fix a use-after-free issue with the nfs server.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/super.c')
-rw-r--r-- | fs/nfs/super.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/nfs/super.c b/fs/nfs/super.c index 97cfb14..665949d 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c @@ -883,13 +883,15 @@ static int nfs4_get_sb(struct file_system_type *fs_type, goto out_free; } + if (s->s_fs_info != server) { + nfs_free_server(server); + server = NULL; + } + if (!s->s_root) { /* initial superblock/root creation */ s->s_flags = flags; - nfs4_fill_super(s); - } else { - nfs_free_server(server); } mntroot = nfs4_get_root(s, &mntfh); |