Re: [PATCH] mips: kernel: use DEFINE_DEBUGFS_ATTRIBUTE with debugfs_create_file_unsafe()

From: Thomas Bogendoerfer
Date: Sun Mar 14 2021 - 09:13:03 EST


On Sat, Mar 13, 2021 at 11:33:48AM +0800, Wang Qing wrote:
> 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@xxxxxxxx>
> ---
> arch/mips/kernel/spinlock_test.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)

applied to mips-next.

Thomas.

--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]