Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kernfs: fix hash calculation in kernfs_rename_ns()
3eef34a ("kernfs: implement kernfs_get_parent(), kernfs_name/path() and friends") restructured kernfs_rename_ns() such that new name assignment happens under kernfs_rename_lock; unfortunately, it mistakenly passed NULL to kernfs_name_hash() to calculate the new hash if the name hasn't changed, which can lead to oops. Fix it by using kn->name and kn->ns when calculating the new hash. Signed-off-by: Tejun Heo <[email protected]> Reported-by: Dan Carpenter [email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
- Loading branch information