linux-stable/fs/debugfs
Greg Kroah-Hartman de5ae40870 debugfs: be more robust at handling improper input in debugfs_lookup()
commit bc6de804d3 upstream.

debugfs_lookup() doesn't like it if it is passed an illegal name
pointer, or if the filesystem isn't even initialized yet.  If either of
these happen, it will crash the system, so fix it up by properly testing
for valid input and that we are up and running before trying to find a
file in the filesystem.

Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: stable <stable@vger.kernel.org>
Reported-by: Michael Walle <michael@walle.cc>
Tested-by: Michael Walle <michael@walle.cc>
Tested-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20210218100818.3622317-1-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-04 10:26:09 +01:00
..
file.c debugfs: Fix module state check condition 2020-09-17 13:47:55 +02:00
inode.c debugfs: be more robust at handling improper input in debugfs_lookup() 2021-03-04 10:26:09 +01:00
internal.h debugfs: Remove redundant license text 2017-11-07 20:25:03 +01:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00