]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 2 May 2019 20:41:29 +0000 (21:41 +0100)
commita2cb3de3961bb84687dd4f6c2108e2bc92a3f499
treed3fa0b816e15adbd7f16623e302bb52897e447af
parent5cd34b292e1391b1745ad43b4f4a36ec66af0fcd
debugfs: fix debugfs_rename parameter checking

commit d88c93f090f708c18195553b352b9f205e65418f upstream.

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.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
fs/debugfs/inode.c