Skip to content

Commit

Permalink
nfs: fix oops in nfs_rename()
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reported-by: Marvin <[email protected]>
Cc: Trond Myklebust <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Trond Myklebust <[email protected]>
  • Loading branch information
OGAWAHirofumi authored and Trond Myklebust committed Jan 6, 2010
1 parent 6c85309 commit 5633593
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/nfs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 5633593

Please sign in to comment.