lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tip-b199ac6c4943aa0db246163bf6b483e2bb53431b@git.kernel.org>
Date:   Mon, 26 Sep 2016 09:32:03 -0700
From:   tip-bot for Borislav Petkov <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     mingo@...nel.org, linux-kernel@...r.kernel.org,
        torvalds@...ux-foundation.org, bp@...e.de, hpa@...or.com,
        tglx@...utronix.de, peterz@...radead.org
Subject: [tip:ras/core] x86/RAS/mce_amd_inj: Remove debugfs dir recursively
 on exit

Commit-ID:  b199ac6c4943aa0db246163bf6b483e2bb53431b
Gitweb:     http://git.kernel.org/tip/b199ac6c4943aa0db246163bf6b483e2bb53431b
Author:     Borislav Petkov <bp@...e.de>
AuthorDate: Mon, 26 Sep 2016 10:31:52 +0200
Committer:  Ingo Molnar <mingo@...nel.org>
CommitDate: Mon, 26 Sep 2016 11:13:17 +0200

x86/RAS/mce_amd_inj: Remove debugfs dir recursively on exit

Simplify exit_mce_inject() by using debugfs_remove_recursive() and do
away with the noodling over the dentry elements.

Signed-off-by: Borislav Petkov <bp@...e.de>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Link: http://lkml.kernel.org/r/20160926083152.30848-3-bp@alien8.de
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
 arch/x86/ras/mce_amd_inj.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/arch/x86/ras/mce_amd_inj.c b/arch/x86/ras/mce_amd_inj.c
index 20b227f..1ac7647 100644
--- a/arch/x86/ras/mce_amd_inj.c
+++ b/arch/x86/ras/mce_amd_inj.c
@@ -475,15 +475,11 @@ err_dfs_add:
 
 static void __exit exit_mce_inject(void)
 {
-	int i;
 
-	for (i = 0; i < ARRAY_SIZE(dfs_fls); i++)
-		debugfs_remove(dfs_fls[i].d);
+	debugfs_remove_recursive(dfs_inj);
+	dfs_inj = NULL;
 
 	memset(&dfs_fls, 0, sizeof(dfs_fls));
-
-	debugfs_remove(dfs_inj);
-	dfs_inj = NULL;
 }
 module_init(init_mce_inject);
 module_exit(exit_mce_inject);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ