]> git.baikalelectronics.ru Git - kernel.git/commit
rpc: properly check debugfs dentry before using it
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Feb 2019 18:27:34 +0000 (19:27 +0100)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Tue, 12 Feb 2019 20:51:39 +0000 (15:51 -0500)
commit4fd5e669145a1ced82e74568acf49897e1c14977
treeed3438b4e7702c396e41c778b3fe7c195c6f8429
parentfc5eaa3ea7b4bda277f471f1ec04b5affcaa08c8
rpc: properly check debugfs dentry before using it

debugfs can now report an error code if something went wrong instead of
just NULL.  So if the return value is to be used as a "real" dentry, it
needs to be checked if it is an error before dereferencing it.

This is now happening because of 9aab8ec1d842 ("debugfs: return error
values, not NULL"), but why debugfs files are not being created properly
is an older issue, probably one that has always been there and should
probably be looked at...

Cc: "J. Bruce Fields" <bfields@fieldses.org>
Cc: Jeff Layton <jlayton@kernel.org>
Cc: Trond Myklebust <trond.myklebust@hammerspace.com>
Cc: Anna Schumaker <anna.schumaker@netapp.com>
Cc: linux-nfs@vger.kernel.org
Cc: netdev@vger.kernel.org
Reported-by: David Howells <dhowells@redhat.com>
Tested-by: David Howells <dhowells@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
net/sunrpc/debugfs.c