Home
last modified time | relevance | path

Searched hist:"9561 a896" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/fs/kernfs/
H A Ddir.c9561a896 Mon Feb 10 16:57:09 CST 2014 Tejun Heo <tj@kernel.org> kernfs: fix hash calculation in kernfs_rename_ns()

3eef34ad7dc3 ("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 <tj@kernel.org>
Reported-by: Dan Carpenter dan.carpenter@oracle.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9561a896 Mon Feb 10 16:57:09 CST 2014 Tejun Heo <tj@kernel.org> kernfs: fix hash calculation in kernfs_rename_ns()

3eef34ad7dc3 ("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 <tj@kernel.org>
Reported-by: Dan Carpenter dan.carpenter@oracle.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>