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]
Date:   Tue, 16 May 2023 19:25:39 -0000
From:   "tip-bot2 for Osama Muhammad" <tip-bot2@...utronix.de>
To:     linux-tip-commits@...r.kernel.org
Cc:     Osama Muhammad <osmtendev@...il.com>,
        "Borislav Petkov (AMD)" <bp@...en8.de>, x86@...nel.org,
        linux-kernel@...r.kernel.org
Subject: [tip: ras/core] ras/debugfs: Fix error checking for debugfs_create_dir()

The following commit has been merged into the ras/core branch of tip:

Commit-ID:     2a1d18a5dc5056825b8e9527d188130da6256efc
Gitweb:        https://git.kernel.org/tip/2a1d18a5dc5056825b8e9527d188130da6256efc
Author:        Osama Muhammad <osmtendev@...il.com>
AuthorDate:    Tue, 16 May 2023 23:29:27 +05:00
Committer:     Borislav Petkov (AMD) <bp@...en8.de>
CommitterDate: Tue, 16 May 2023 21:12:23 +02:00

ras/debugfs: Fix error checking for debugfs_create_dir()

Check the return value of debugfs_create_dir() properly.

  [ bp: Rewrite commit message. ]

Signed-off-by: Osama Muhammad <osmtendev@...il.com>
Signed-off-by: Borislav Petkov (AMD) <bp@...en8.de>
Link: https://lore.kernel.org/r/20230516182927.9171-1-osmtendev@gmail.com
---
 drivers/ras/debugfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/ras/debugfs.c b/drivers/ras/debugfs.c
index f0a6391..ffb973c 100644
--- a/drivers/ras/debugfs.c
+++ b/drivers/ras/debugfs.c
@@ -46,7 +46,7 @@ int __init ras_add_daemon_trace(void)
 
 	fentry = debugfs_create_file("daemon_active", S_IRUSR, ras_debugfs_dir,
 				     NULL, &trace_fops);
-	if (!fentry)
+	if (IS_ERR(fentry))
 		return -ENODEV;
 
 	return 0;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ