]> git.baikalelectronics.ru Git - kernel.git/commit
debugfs: fix debugfs_rename parameter checking
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 23 Jan 2019 10:27:02 +0000 (11:27 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 Jan 2019 11:56:32 +0000 (12:56 +0100)
commit0d59d2a75a21fb5f8ef6f5b259e2bd598a6cca49
tree76d7cecb24578d4a38e2aca3f827c52501508afe
parente686d5da615f4212d32c48ddf08dd7ce22d17c4e
debugfs: fix debugfs_rename parameter checking

debugfs_rename() needs to check that the dentries passed into it really
are valid, as sometimes they are not (i.e. if the return value of
another debugfs call is passed into this one.)  So fix this up by
properly checking if the two parent directories are errors (they are
allowed to be NULL), and if the dentry to rename is not NULL or an
error.

Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/debugfs/inode.c