mips: kernel: use DEFINE_DEBUGFS_ATTRIBUTE with debugfs_create_file_unsafe()
authorWang Qing <wangqing@vivo.com>
Sat, 13 Mar 2021 03:33:48 +0000 (11:33 +0800)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Sun, 14 Mar 2021 13:09:49 +0000 (14:09 +0100)
commit63d6c98168916f0c18f7bb7a28e27efd95524409
treef2e14e25487dbec5e027109f9117ad1d31b2c7e4
parentc6972fb9ba8aab384568665411015b7deb8a8609
mips: kernel: use DEFINE_DEBUGFS_ATTRIBUTE with debugfs_create_file_unsafe()

debugfs_create_file_unsafe does not protect the fops handed to it
against file removal. DEFINE_DEBUGFS_ATTRIBUTE makes the fops aware of
the file lifetime and thus protects it against removal.

Signed-off-by: Wang Qing <wangqing@vivo.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
arch/mips/kernel/spinlock_test.c