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-next>] [day] [month] [year] [list]
Message-ID: <543A6C3A.4070408@gmail.com>
Date:	Sun, 12 Oct 2014 22:25:38 +1030
From:	Daniel Cotton <danielcotton.mailinglists@...il.com>
To:	axboe@...com
CC:	linux-kernel@...r.kernel.org
Subject: [PATCH RESEND] drivers/block/mtip32xx: Fix incorrect warning

Prevent mtip32xx block driver from showing a warning at load time 
("Error creating debugfs parent") when debugfs is not included in
the kernel. If debugfs is included, show the error code. Fixes bug
55831 in the Bugzilla.

Signed-off-by: Daniel Cotton <danielcotton.patches@...il.com>
---
  drivers/block/mtip32xx/mtip32xx.c | 11 +++++++----
  1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/block/mtip32xx/mtip32xx.c 
b/drivers/block/mtip32xx/mtip32xx.c
index 5c8e7fe..1124c61 100644
--- a/drivers/block/mtip32xx/mtip32xx.c
+++ b/drivers/block/mtip32xx/mtip32xx.c
@@ -4686,16 +4686,19 @@ static int __init mtip_init(void)
  	mtip_major = error;

  	dfs_parent = debugfs_create_dir("rssd", NULL);
-	if (IS_ERR_OR_NULL(dfs_parent)) {
-		pr_warn("Error creating debugfs parent\n");
+	if (IS_ERR_OR_NULL(dfs_parent) && PTR_ERR(dfs_parent) != -ENODEV) {
+		pr_warn("Error creating debugfs parent, error code: %ld\n",
+			PTR_ERR(dfs_parent));
  		dfs_parent = NULL;
  	}
  	if (dfs_parent) {
  		dfs_device_status = debugfs_create_file("device_status",
  					S_IRUGO, dfs_parent, NULL,
  					&mtip_device_status_fops);
-		if (IS_ERR_OR_NULL(dfs_device_status)) {
-			pr_err("Error creating device_status node\n");
+		if (IS_ERR_OR_NULL(dfs_device_status) &&
+		    PTR_ERR(dfs_device_status) != -ENODEV) {
+			pr_err("Error creating device_status node, error code: %ld\n",
+				PTR_ERR(dfs_device_status));
  			dfs_device_status = NULL;
  		}
  	}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ