]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
nfs: fix oops in nfs_rename()
authorOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Wed, 6 Jan 2010 23:48:26 +0000 (18:48 -0500)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Wed, 6 Jan 2010 23:48:26 +0000 (18:48 -0500)
Recent change is missing to update "rehash".  With that change, it will
become the cause of adding dentry to hash twice.

This explains the reason of Oops (dereference the freed dentry in
__d_lookup()) on my machine.

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Reported-by: Marvin <marvin24@gmx.de>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/dir.c

index 2c5ace4f00a7ffecfcf41c21e512833ef70d426b..3c7f03b669fb62a7a9158b8d699a24249e51c66d 100644 (file)
@@ -1615,6 +1615,7 @@ static int nfs_rename(struct inode *old_dir, struct dentry *old_dentry,
                                goto out;
 
                        new_dentry = dentry;
+                       rehash = NULL;
                        new_inode = NULL;
                }
        }