kcsan, debugfs: Move debugfs file creation out of early init
authorMarco Elver <elver@google.com>
Wed, 3 Mar 2021 09:38:45 +0000 (10:38 +0100)
committerPaul E. McKenney <paulmck@kernel.org>
Mon, 8 Mar 2021 22:27:43 +0000 (14:27 -0800)
commite36299efe7d749976fbdaaf756dee6ef32543c2c
treec92c7b27b9c35ea455a03ba99270caa65322b505
parenta38fd8748464831584a19438cbb3082b5a2dab15
kcsan, debugfs: Move debugfs file creation out of early init

Commit 56348560d495 ("debugfs: do not attempt to create a new file
before the filesystem is initalized") forbids creating new debugfs files
until debugfs is fully initialized.  This means that KCSAN's debugfs
file creation, which happened at the end of __init(), no longer works.
And was apparently never supposed to work!

However, there is no reason to create KCSAN's debugfs file so early.
This commit therefore moves its creation to a late_initcall() callback.

Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: stable <stable@vger.kernel.org>
Fixes: 56348560d495 ("debugfs: do not attempt to create a new file before the filesystem is initalized")
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Marco Elver <elver@google.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
kernel/kcsan/core.c
kernel/kcsan/debugfs.c
kernel/kcsan/kcsan.h